Repository: incubator-gobblin
Updated Branches:
  refs/heads/master 6eb253e7e -> 44ca63cf7


[GOBBLIN-336] Set unused Helix task result info field to an empty string

This field is not used.
This change removes the need for the child task
process to send the
workunit count back to the control process.

Closes #2204 from HappyRay/remove-helix-task-
result-info


Project: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/commit/44ca63cf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/tree/44ca63cf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/diff/44ca63cf

Branch: refs/heads/master
Commit: 44ca63cf70ec5daac8884835993cdd7306b8bb28
Parents: 6eb253e
Author: Ray Yang <[email protected]>
Authored: Wed Dec 13 22:59:33 2017 -0800
Committer: Hung Tran <[email protected]>
Committed: Wed Dec 13 22:59:45 2017 -0800

----------------------------------------------------------------------
 .../java/org/apache/gobblin/cluster/GobblinHelixTask.java |  4 ++--
 .../java/org/apache/gobblin/cluster/SingleHelixTask.java  | 10 +---------
 2 files changed, 3 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/44ca63cf/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixTask.java
----------------------------------------------------------------------
diff --git 
a/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixTask.java
 
b/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixTask.java
index 8166cfe..bf74f17 100644
--- 
a/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixTask.java
+++ 
b/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixTask.java
@@ -101,8 +101,8 @@ public class GobblinHelixTask implements Task {
     try (Closer closer = Closer.create()) {
       closer.register(MDC.putCloseable(ConfigurationKeys.JOB_NAME_KEY, 
this.jobName));
       closer.register(MDC.putCloseable(ConfigurationKeys.JOB_KEY_KEY, 
this.jobKey));
-      int workUnitSize = this.task.run();
-      return new TaskResult(TaskResult.Status.COMPLETED, 
String.format("completed tasks: %d", workUnitSize));
+      this.task.run();
+      return new TaskResult(TaskResult.Status.COMPLETED, "");
     } catch (InterruptedException ie) {
       Thread.currentThread().interrupt();
       return new TaskResult(TaskResult.Status.CANCELED, "");

http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/44ca63cf/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/SingleHelixTask.java
----------------------------------------------------------------------
diff --git 
a/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/SingleHelixTask.java 
b/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/SingleHelixTask.java
index 9817a4f..04f9253 100644
--- 
a/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/SingleHelixTask.java
+++ 
b/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/SingleHelixTask.java
@@ -66,16 +66,9 @@ public class SingleHelixTask {
     _stateStores = stateStores;
   }
 
-  /**
-   *
-   * @return the number of work-units processed
-   * @throws IOException
-   * @throws InterruptedException
-   */
-  public int run()
+  public void run()
       throws IOException, InterruptedException {
     List<WorkUnit> workUnits = getWorkUnits();
-    int workUnitSize = workUnits.size();
 
     JobState jobState = getJobState();
     Config jobConfig = getConfigFromJobState(jobState);
@@ -86,7 +79,6 @@ public class SingleHelixTask {
 
       _taskattempt = _taskAttemptBuilder.build(workUnits.iterator(), _jobId, 
jobState, jobBroker);
       
_taskattempt.runAndOptionallyCommitTaskAttempt(GobblinMultiTaskAttempt.CommitPolicy.IMMEDIATE);
-      return workUnitSize;
     }
   }
 

Reply via email to