sv2000 commented on a change in pull request #2883: GOBBLIN-1043: Implement a Helix assigned participant check as a Commi… URL: https://github.com/apache/incubator-gobblin/pull/2883#discussion_r376518396
########## File path: gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixTaskFactory.java ########## @@ -113,6 +124,11 @@ public Task createNewTask(TaskCallbackContext context) { if (this.newTasksCounter.isPresent()) { this.newTasksCounter.get().inc(); } - return new GobblinHelixTask(builder, context, this.taskAttemptBuilder, this.stateStores, this.taskMetrics); + + if (!this.taskDriver.isPresent()) { Review comment: Indeed. The reason for exposing the TaskDriver arg in the constructor is to allow passing in mock TaskDrivers for writing unit tests. e.g. see GobblinHelixTaskTest. I added javadoc explaining that the constructor with the TaskDriver argument is to be used for testing only. Would be happy to hear alternate suggestions. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services