本文整理汇总了Java中org.apache.helix.manager.zk.ZKHelixManager.ALLOW_PARTICIPANT_AUTO_JOIN属性的典型用法代码示例。如果您正苦于以下问题:Java ZKHelixManager.ALLOW_PARTICIPANT_AUTO_JOIN属性的具体用法?Java ZKHelixManager.ALLOW_PARTICIPANT_AUTO_JOIN怎么用?Java ZKHelixManager.ALLOW_PARTICIPANT_AUTO_JOIN使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.helix.manager.zk.ZKHelixManager
的用法示例。
在下文中一共展示了ZKHelixManager.ALLOW_PARTICIPANT_AUTO_JOIN属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createGobblinYarnHelixCluster
/**
* Create a Helix cluster with the cluster name specified using
* {@link GobblinYarnConfigurationKeys#HELIX_CLUSTER_NAME_KEY} if it does not exist.
*/
private void createGobblinYarnHelixCluster() {
ClusterSetup clusterSetup =
new ClusterSetup(this.config.getString(GobblinYarnConfigurationKeys.ZK_CONNECTION_STRING_KEY));
String clusterName = this.config.getString(GobblinYarnConfigurationKeys.HELIX_CLUSTER_NAME_KEY);
// Create the cluster and overwrite if it already exists
clusterSetup.addCluster(clusterName, true);
// Helix 0.6.x requires a configuration property to have the form key=value.
String autoJoinConfig = ZKHelixManager.ALLOW_PARTICIPANT_AUTO_JOIN + "=true";
clusterSetup.setConfig(HelixConfigScope.ConfigScopeProperty.CLUSTER, clusterName, autoJoinConfig);
LOGGER.info("Created Helix cluster " + clusterName);
}
示例2: createGobblinHelixCluster
/**
* Create a Helix cluster for the Gobblin Cluster application.
*
* @param zkConnectionString the ZooKeeper connection string
* @param clusterName the Helix cluster name
* @param overwrite true to overwrite exiting cluster, false to reuse existing cluster
*/
public static void createGobblinHelixCluster(String zkConnectionString, String clusterName, boolean overwrite) {
ClusterSetup clusterSetup = new ClusterSetup(zkConnectionString);
// Create the cluster and overwrite if it already exists
clusterSetup.addCluster(clusterName, overwrite);
// Helix 0.6.x requires a configuration property to have the form key=value.
String autoJoinConfig = ZKHelixManager.ALLOW_PARTICIPANT_AUTO_JOIN + "=true";
clusterSetup.setConfig(HelixConfigScope.ConfigScopeProperty.CLUSTER, clusterName, autoJoinConfig);
}