当前位置: 首页>>代码示例>>Java>>正文


Java ZKHelixManager.ALLOW_PARTICIPANT_AUTO_JOIN属性代码示例

本文整理汇总了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);
}
 
开发者ID:Hanmourang,项目名称:Gobblin,代码行数:15,代码来源:GobblinYarnAppLauncher.java

示例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);
}
 
开发者ID:apache,项目名称:incubator-gobblin,代码行数:15,代码来源:HelixUtils.java


注:本文中的org.apache.helix.manager.zk.ZKHelixManager.ALLOW_PARTICIPANT_AUTO_JOIN属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。