Examples of liveInstances()


Examples of com.linkedin.helix.PropertyKey.Builder.liveInstances()

    ZKHelixDataAccessor accessor =
        new ZKHelixDataAccessor(clusterName, new ZkBaseDataAccessor<ZNRecord>(_zkClient));
    Builder keyBuilder = accessor.keyBuilder();

    String root = "/" + clusterName;
    if (accessor.getChildNames(keyBuilder.liveInstances()).size() > 0)
    {
      throw new HelixException("There are still live instances in the cluster, shut them down first.");
    }

    if (accessor.getProperty(keyBuilder.controllerLeader()) != null)
View Full Code Here

Examples of com.linkedin.helix.PropertyKey.Builder.liveInstances()

      } else if (_changeType == LIVE_INSTANCE)
      {
        LiveInstanceChangeListener liveInstanceChangeListener = (LiveInstanceChangeListener) _listener;
        subscribeForChanges(changeContext, true, false);
        List<LiveInstance> liveInstances = _accessor.getChildValues(keyBuilder.liveInstances());
        liveInstanceChangeListener.onLiveInstanceChange(liveInstances, changeContext);

      } else if (_changeType == CURRENT_STATE)
      {
        CurrentStateChangeListener currentStateChangeListener;
View Full Code Here

Examples of com.linkedin.helix.PropertyKey.Builder.liveInstances()

      {
        LiveInstanceChangeListener liveInstanceChangeListener =
            (LiveInstanceChangeListener) _listener;
        subscribeForChanges(changeContext, _path, true, false);
        List<LiveInstance> liveInstances =
            _accessor.getChildValues(keyBuilder.liveInstances());

        liveInstanceChangeListener.onLiveInstanceChange(liveInstances, changeContext);

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

Examples of com.linkedin.helix.PropertyKey.Builder.liveInstances()

    ZKHelixDataAccessor accessor =
        new ZKHelixDataAccessor(clusterName, new ZkBaseDataAccessor<ZNRecord>(_zkClient));
    Builder keyBuilder = accessor.keyBuilder();

    String root = "/" + clusterName;
    if (accessor.getChildNames(keyBuilder.liveInstances()).size() > 0)
    {
      throw new HelixException("There are still live instances in the cluster, shut them down first.");
    }

    if (accessor.getProperty(keyBuilder.controllerLeader()) != null)
View Full Code Here

Examples of com.linkedin.helix.PropertyKey.Builder.liveInstances()

  }

  public boolean refresh(HelixDataAccessor accessor)
  {
    Builder keyBuilder = accessor.keyBuilder();
    _liveInstanceMap = accessor.getChildValuesMap(keyBuilder.liveInstances());

    Map<String, Map<String, HealthStat>> hsMap = new HashMap<String, Map<String, HealthStat>>();

    for (String instanceName : _liveInstanceMap.keySet())
    {
View Full Code Here

Examples of com.linkedin.helix.PropertyKey.Builder.liveInstances()

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

          List<LiveInstance> liveInstances =
              accessor.getChildValues(keyBuilder.liveInstances());

          for (LiveInstance liveInstance : liveInstances)
          {
            sessionIdMap.put(liveInstance.getInstanceName(), liveInstance.getSessionId());
          }
View Full Code Here

Examples of com.linkedin.helix.PropertyKey.Builder.liveInstances()

//    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
    List<ZNRecord> idealStateList = HelixProperty.convertToList(accessor.getChildValues(keyBuilder.idealStates()));
   
View Full Code Here

Examples of com.linkedin.helix.PropertyKey.Builder.liveInstances()

  public static String parseInstanceName(String actualStatName, HelixManager manager)
  {
    HelixDataAccessor accessor = manager.getHelixDataAccessor();
    Builder kb = accessor.keyBuilder();
    List<LiveInstance> liveInstances = accessor.getChildValues(kb.liveInstances());
    for (LiveInstance instance : liveInstances)
    {
      String instanceName = instance.getInstanceName();
      if(actualStatName.startsWith(instanceName))
      {
View Full Code Here

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

//    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
    List<ZNRecord> idealStateList = HelixProperty.convertToList(accessor.getChildValues(keyBuilder.idealStates()));
   
View Full Code Here

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

  public boolean refresh(HelixDataAccessor accessor)
  {
    Builder keyBuilder = accessor.keyBuilder();
    _idealStateMap = accessor.getChildValuesMap(keyBuilder.idealStates());
    _liveInstanceMap = accessor.getChildValuesMap(keyBuilder.liveInstances());

    for (LiveInstance instance : _liveInstanceMap.values())
    {
      LOG.trace("live instance: " + instance.getInstanceName() + " "
          + instance.getSessionId());
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.