arjun4084346 commented on a change in pull request #3427:
URL: https://github.com/apache/gobblin/pull/3427#discussion_r750795320



##########
File path: 
gobblin-cluster/src/main/java/org/apache/gobblin/cluster/HelixRetriggeringJobCallable.java
##########
@@ -126,8 +126,17 @@ public HelixRetriggeringJobCallable(
     this.planningJobLauncherMetrics = planningJobLauncherMetrics;
     this.helixMetrics = helixMetrics;
     this.appWorkDir = appWorkDir;
-    this.jobHelixManager = jobHelixManager;
-    this.taskDriverHelixManager = taskDriverHelixManager;
+
+    // make a copy of helix managers, so that each job can keep using it 
without worrying about disconnect from the GobblinClusterManager where they are 
created
+    this.jobHelixManager = 
GobblinHelixMultiManager.buildHelixManager(ConfigUtils.propertiesToConfig(sysProps),
+        
sysProps.getProperty(GobblinClusterConfigurationKeys.ZK_CONNECTION_STRING_KEY),
+        GobblinClusterConfigurationKeys.HELIX_CLUSTER_NAME_KEY, 
jobHelixManager.getInstanceType());
+
+    this.taskDriverHelixManager = taskDriverHelixManager.map(
+        helixManager -> 
GobblinHelixMultiManager.buildHelixManager(ConfigUtils.propertiesToConfig(sysProps),
+            
sysProps.getProperty(GobblinClusterConfigurationKeys.ZK_CONNECTION_STRING_KEY),
+            GobblinClusterConfigurationKeys.TASK_DRIVER_CLUSTER_NAME_KEY, 
helixManager.getInstanceType()));
+

Review comment:
       I agree, the existing code did not look good to me as well. will change




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to