Package org.apache.helix.model

Examples of org.apache.helix.model.HelixConfigScope


//    // parse keys
//    String[] keys = keysStr.split("[\\s,]");
//    Set<String> keysSet = new HashSet<String>(Arrays.asList(keys));
   
    String[] scopeArgs = scopeArgsCsv.split("[\\s,]");
    HelixConfigScope scope = new HelixConfigScopeBuilder(type, scopeArgs).build();

    String[] keys = keysCsv.split("[\\s,]");

    _admin.removeConfig(scope, Arrays.asList(keys));
  }
View Full Code Here


  public String getConfig(ConfigScopeProperty type, String scopeArgsCsv, String keysCsv)
  {
//    ConfigScope scope = new ConfigScopeBuilder().build(scopesStr);

    String[] scopeArgs = scopeArgsCsv.split("[\\s,]");
    HelixConfigScope scope = new HelixConfigScopeBuilder(type, scopeArgs).build();

    String[] keys = keysCsv.split("[\\s,]");
    // parse keys
//    String[] keys = keysStr.split("[\\s,]");
//    Set<String> keysSet = new HashSet<String>(Arrays.asList(keys));
View Full Code Here

    // auto create cluster and allow nodes to automatically join the cluster
    admin = HelixManagerFactory.getZKHelixManager(cluster, "service-discovery",
        InstanceType.ADMINISTRATOR, zkAddress);
    admin.connect();
    admin.getClusterManagmentTool().addCluster(cluster, false);
    HelixConfigScope scope = new HelixConfigScopeBuilder(
        ConfigScopeProperty.CLUSTER).forCluster(cluster).build();

    Map<String, String> properties = new HashMap<String, String>();
    properties.put(ZKHelixManager.ALLOW_PARTICIPANT_AUTO_JOIN,
        String.valueOf(true));
View Full Code Here

    }
    // Read cluster config and see if instance can auto join the cluster
    boolean autoJoin = false;
    try
    {
      HelixConfigScope scope =
          new HelixConfigScopeBuilder(ConfigScopeProperty.CLUSTER).forCluster(getClusterName())
                                  .build();
      autoJoin = Boolean.parseBoolean(getConfigAccessor().get(scope, ALLOW_PARTICIPANT_AUTO_JOIN));
      logger.info("Auto joining " + _clusterName +" is true");
    }
View Full Code Here

TOP

Related Classes of org.apache.helix.model.HelixConfigScope

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.