beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From al...@apache.org
Subject [beam] 01/01: [BEAM-2400] Use getJobId() consistently
Date Tue, 04 Dec 2018 18:45:59 GMT
This is an automated email from the ASF dual-hosted git repository.

altay pushed a commit to branch aaltay-patch-1
in repository https://gitbox.apache.org/repos/asf/beam.git

commit a3d26112f38d33fd419d0bf014ebe3594ec70931
Author: Ahmet Altay <altay@google.com>
AuthorDate: Tue Dec 4 10:45:48 2018 -0800

    [BEAM-2400] Use getJobId() consistently
---
 .../java/org/apache/beam/runners/dataflow/DataflowPipelineJob.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowPipelineJob.java
b/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowPipelineJob.java
index 93c055b..3ccef15 100644
--- a/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowPipelineJob.java
+++ b/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowPipelineJob.java
@@ -288,7 +288,7 @@ public class DataflowPipelineJob implements PipelineResult {
       if (messageHandler != null && !hasError) {
         // Process all the job messages that have accumulated so far.
         try {
-          List<JobMessage> allMessages = monitor.getJobMessages(jobId, lastTimestamp);
+          List<JobMessage> allMessages = monitor.getJobMessages(getJobId(), lastTimestamp);
 
           if (!allMessages.isEmpty()) {
             lastTimestamp =
@@ -375,7 +375,7 @@ public class DataflowPipelineJob implements PipelineResult {
               content.setId(jobId);
               content.setRequestedState("JOB_STATE_CANCELLED");
               try {
-                Job job = dataflowClient.updateJob(jobId, content);
+                Job job = dataflowClient.updateJob(getJobId(), content);
                 return MonitoringUtil.toState(job.getCurrentState());
               } catch (IOException e) {
                 State state = getState();
@@ -468,7 +468,7 @@ public class DataflowPipelineJob implements PipelineResult {
     // Retry loop ends in return or throw
     while (true) {
       try {
-        Job job = dataflowClient.getJob(jobId);
+        Job job = dataflowClient.getJob(getJobId());
         State currentState = MonitoringUtil.toState(job.getCurrentState());
         if (currentState.isTerminal()) {
           terminalState = currentState;


Mime
View raw message