Skip to content
Permalink
Browse files

[GOBBLIN-904] Provide an option to reuse an existing Helix cluster on…

… Gobblin-Yarn application launch[]

Closes #2757 from sv2000/reuseHelixCluster
  • Loading branch information...
sv2000 authored and suvasude committed Oct 8, 2019
1 parent 5b8af8c commit 144669493453621fbeb05c77e5d47f8e204b62df
@@ -169,4 +169,8 @@
public static final long DEFAULT_HELIX_JOB_STOPPING_STATE_TIMEOUT_SECONDS = 300;
public static final String CONTAINER_HEALTH_METRICS_SERVICE_ENABLED = GOBBLIN_CLUSTER_PREFIX + "container.health.metrics.service.enabled" ;
public static final boolean DEFAULT_CONTAINER_HEALTH_METRICS_SERVICE_ENABLED = false;

//Config to enable/disable reuse of existing Helix Cluster
public static final String HELIX_CLUSTER_OVERWRITE_KEY = GOBBLIN_CLUSTER_PREFIX + "helix.overwrite";
public static final boolean DEFAULT_HELIX_CLUSTER_OVERWRITE = true;
}
@@ -283,8 +283,11 @@ public void launch() throws IOException, YarnException {
this.eventBus.register(this);

String clusterName = this.config.getString(GobblinClusterConfigurationKeys.HELIX_CLUSTER_NAME_KEY);
boolean overwriteExistingCluster = ConfigUtils.getBoolean(this.config, GobblinClusterConfigurationKeys.HELIX_CLUSTER_OVERWRITE_KEY,
GobblinClusterConfigurationKeys.DEFAULT_HELIX_CLUSTER_OVERWRITE);
LOGGER.info("Creating Helix cluster {} with overwrite: {}", clusterName, overwriteExistingCluster);
HelixUtils.createGobblinHelixCluster(
this.config.getString(GobblinClusterConfigurationKeys.ZK_CONNECTION_STRING_KEY), clusterName);
this.config.getString(GobblinClusterConfigurationKeys.ZK_CONNECTION_STRING_KEY), clusterName, overwriteExistingCluster);
LOGGER.info("Created Helix cluster " + clusterName);

connectHelixManager();

0 comments on commit 1446694

Please sign in to comment.
You can’t perform that action at this time.