[
https://issues.apache.org/jira/browse/GOBBLIN-1575?focusedWorklogId=682345&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-682345
]
ASF GitHub Bot logged work on GOBBLIN-1575:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 17/Nov/21 00:35
Start Date: 17/Nov/21 00:35
Worklog Time Spent: 10m
Work Description: phet commented on a change in pull request #3427:
URL: https://github.com/apache/gobblin/pull/3427#discussion_r750785564
##########
File path:
gobblin-cluster/src/main/java/org/apache/gobblin/cluster/HelixRetriggeringJobCallable.java
##########
@@ -263,7 +275,7 @@ private void runJobExecutionLauncher() throws JobException {
jobLock.lock();
try {
- if (planningJobIdFromStore.isPresent() &&
!canRun(planningJobIdFromStore.get(), planningJobManager)) {
+ if (planningJobIdFromStore.isPresent() &&
!canRun(planningJobIdFromStore.get(), planningJobHelixManager)) {
Review comment:
not pressing, but equivalent:
```
if (planningJobIdFromStore.map(id -> !canRun(id,
planningJobHelixManager)).getOrElse(false)) {
```
##########
File path:
gobblin-cluster/src/main/java/org/apache/gobblin/cluster/HelixRetriggeringJobCallable.java
##########
@@ -249,8 +260,9 @@ private void runJobExecutionLauncher() throws JobException {
String newPlanningId;
Closer closer = Closer.create();
try {
- HelixManager planningJobManager =
this.taskDriverHelixManager.isPresent()?
+ HelixManager planningJobHelixManager =
this.taskDriverHelixManager.isPresent()?
this.taskDriverHelixManager.get() : this.jobHelixManager;
Review comment:
`getOrElse`?
...actually thought I earlier saw a similar replacement above...
##########
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:
yeah, I suppose `GobblinHelixMultiManager.buildHelixManager` is already
a utility, probably excessive to abstract too much beyond. what I noticed is
that (before calling) you're pulling a property out of the same `Config` you
provide to the call. usage shows `ZK_CONNECTION_STRING_KEY` to be pretty
widely referenced... what about a 3-param overload:
```
protected static HelixManager buildHelixManager(Config config, String
clusterName, InstanceType type) {
return buildHelixManager(config,
config.getProperty(GobblinClusterConfigurationKeys.ZK_CONNECTION_STRING_KEY),
clusterName, type);
}
```
?
is
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 682345)
Time Spent: 0.5h (was: 20m)
> use distinct HelixJobManager
> ----------------------------
>
> Key: GOBBLIN-1575
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1575
> Project: Apache Gobblin
> Issue Type: Bug
> Reporter: Arjun Singh Bora
> Priority: Major
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> GobblinTaskRunner creates a HelixManager and passes it to HelixJobTask. When
> the GobblinTaskRunner is stopped, it disconnects to HelixManager, but because
> the HelixJobTask is also using the same HelixManager object, it cannot use it
> do its own shutdown operation. This PR will make a copy of HelixManager to be
> used by HelixJobTask 's.
> Same argument with GobblinClusterManager passing the same HelixManager object
> to
> [HelixRetriggeringJobCallable|https://github.com/apache/gobblin/pull/3427/files#diff-28c7588c2dc9414f72d21e77aa21d3e3a7f098a0c4842429944d9a398eee8706]
--
This message was sent by Atlassian Jira
(v8.20.1#820001)