Examples of instanceConfigs()


Examples of org.apache.helix.PropertyKey.Builder.instanceConfigs()

    // Get all the ZNRecords in the cluster and set them as bind variables
    Builder keyBuilder = accessor.keyBuilder();
//    List<ZNRecord> instanceConfigs = accessor.getChildValues(PropertyType.CONFIGS,
//        ConfigScopeProperty.PARTICIPANT.toString());
   
    List<ZNRecord> instanceConfigs = HelixProperty.convertToList(accessor.getChildValues(keyBuilder.instanceConfigs()));

    List<ZNRecord> liveInstances = HelixProperty.convertToList(accessor.getChildValues(keyBuilder.liveInstances()));
    List<ZNRecord> stateModelDefs = HelixProperty.convertToList(accessor.getChildValues(keyBuilder.stateModelDefs()));
   
    // Idealstates are stored in a map from resource name to idealState ZNRecord
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.instanceConfigs()

      LOG.trace("live instance: " + instance.getInstanceName() + " "
          + instance.getSessionId());
    }

    _stateModelDefMap = accessor.getChildValuesMap(keyBuilder.stateModelDefs());
    _instanceConfigMap = accessor.getChildValuesMap(keyBuilder.instanceConfigs());
    _constraintMap =
        accessor.getChildValuesMap(keyBuilder.constraints());

    Map<String, Map<String, Message>> msgMap =
        new HashMap<String, Map<String, Message>>();
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.instanceConfigs()

                                                               String partition)
    {
      Builder keyBuilder = accessor.keyBuilder();

      List<ZNRecord> instances =
          HelixProperty.convertToList(accessor.getChildValues(keyBuilder.instanceConfigs()));
      List<ZNRecord> partitionRecords = new ArrayList<ZNRecord>();
      for (ZNRecord znRecord : instances)
      {
        String instanceName = znRecord.getId();
        if (!instanceName.equals(instance))
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.instanceConfigs()

      {

        ConfigChangeListener configChangeListener = (ConfigChangeListener) _listener;
        subscribeForChanges(changeContext, _path, true, true);
        List<InstanceConfig> configs =
            _accessor.getChildValues(keyBuilder.instanceConfigs());

        configChangeListener.onConfigChange(configs, changeContext);

      }
      else if (_changeType == LIVE_INSTANCE)
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.instanceConfigs()

  private void refresh(List<ExternalView> externalViewList, NotificationContext changeContext)
  {
    HelixDataAccessor accessor = changeContext.getManager().getHelixDataAccessor();
    Builder keyBuilder = accessor.keyBuilder();
   
    List<InstanceConfig> configList = accessor.getChildValues(keyBuilder.instanceConfigs());
    Map<String, InstanceConfig> instanceConfigMap = new HashMap<String, InstanceConfig>();
    for (InstanceConfig config : configList)
    {
      instanceConfigMap.put(config.getId(), config);
    }
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.instanceConfigs()

    try
    {
      HelixDataAccessor accessor = _manager.getHelixDataAccessor();
      Builder keyBuilder = accessor.keyBuilder();

      List<String> instances = accessor.getChildNames(keyBuilder.instanceConfigs());
      for (String instanceName : instances)
      {
        scanPath(HelixUtil.getInstancePropertyPath(_manager.getClusterName(), instanceName,
            PropertyType.STATUSUPDATES), _thresholdNoChangeInMs);
        scanPath(HelixUtil.getInstancePropertyPath(_manager.getClusterName(), instanceName,
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.instanceConfigs()

    for (LiveInstance instance : _liveInstanceMap.values()) {
      LOG.trace("live instance: " + instance.getInstanceName() + " " + instance.getSessionId());
    }

    _stateModelDefMap = accessor.getChildValuesMap(keyBuilder.stateModelDefs());
    _instanceConfigMap = accessor.getChildValuesMap(keyBuilder.instanceConfigs());
    _constraintMap = accessor.getChildValuesMap(keyBuilder.constraints());

    Map<String, Map<String, Message>> msgMap = new HashMap<String, Map<String, Message>>();
    for (String instanceName : _liveInstanceMap.keySet()) {
      Map<String, Message> map = accessor.getChildValuesMap(keyBuilder.messages(instanceName));
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.instanceConfigs()

    switch (scope) {
    case CLUSTER:
      propertyKey = keyBuilder.clusterConfigs();
      break;
    case PARTICIPANT:
      propertyKey = keyBuilder.instanceConfigs();
      break;
    case RESOURCE:
      propertyKey = keyBuilder.resourceConfigs();
      break;
    default:
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.instanceConfigs()

    Builder keyBuilder = accessor.keyBuilder();
    // List<ZNRecord> instanceConfigs = accessor.getChildValues(PropertyType.CONFIGS,
    // ConfigScopeProperty.PARTICIPANT.toString());

    List<ZNRecord> instanceConfigs =
        HelixProperty.convertToList(accessor.getChildValues(keyBuilder.instanceConfigs()));

    List<ZNRecord> liveInstances =
        HelixProperty.convertToList(accessor.getChildValues(keyBuilder.liveInstances()));
    List<ZNRecord> stateModelDefs =
        HelixProperty.convertToList(accessor.getChildValues(keyBuilder.stateModelDefs()));
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.instanceConfigs()

    logger.info("Scanning status updates ...");
    try {
      HelixDataAccessor accessor = _manager.getHelixDataAccessor();
      Builder keyBuilder = accessor.keyBuilder();

      List<String> instances = accessor.getChildNames(keyBuilder.instanceConfigs());
      for (String instanceName : instances) {
        scanPath(HelixUtil.getInstancePropertyPath(_manager.getClusterName(), instanceName,
            PropertyType.STATUSUPDATES), _thresholdNoChangeInMs);
        scanPath(HelixUtil.getInstancePropertyPath(_manager.getClusterName(), instanceName,
            PropertyType.ERRORS), _thresholdNoChangeInMs * 3);
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.