autumnust commented on a change in pull request #2947: GOBBLIN-1107: Lazily initialize Helix TaskStateModelFactory in Gobbli… URL: https://github.com/apache/incubator-gobblin/pull/2947#discussion_r402042445
########## File path: gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinTaskRunner.java ########## @@ -191,6 +179,17 @@ public GobblinTaskRunner(String applicationName, this.containerMetrics = buildContainerMetrics(); + logger.info("GobblinTaskRunner({}): applicationName {}, helixInstanceName {}, applicationId {}, taskRunnerId {}, config {}, appWorkDir {}", + this.isTaskDriver? "taskDriver" : "worker", + applicationName, + helixInstanceName, + applicationId, + taskRunnerId, + config, + appWorkDirOptional); + } + + private synchronized TaskRunnerSuiteBase initTaskStateModelFactory() throws ReflectiveOperationException { Review comment: this method has both return value and side effect which should be [avoided](https://softwareengineering.stackexchange.com/questions/289948/origin-of-a-method-should-return-a-value-or-have-side-effects-but-not-both). Shall we consider divide it into two: get TaskRunnerSuite and initTaskStateModelFactory(TaskRunnerSuiteBase) if you want to make the init as a method ? ---------------------------------------------------------------- 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