Package org.apache.helix.controller.rebalancer.context

Examples of org.apache.helix.controller.rebalancer.context.PartitionedRebalancerContext.anyLiveParticipant()


    if (partitionedContext != null) {
      IdealState idealState = new IdealState(partitionedContext.getResourceId());
      idealState.setRebalanceMode(partitionedContext.getRebalanceMode());
      idealState.setRebalancerRef(partitionedContext.getRebalancerRef());
      String replicas = null;
      if (partitionedContext.anyLiveParticipant()) {
        replicas = StateModelToken.ANY_LIVEINSTANCE.toString();
      } else {
        replicas = Integer.toString(partitionedContext.getReplicaCount());
      }
      idealState.setReplicas(replicas);
View Full Code Here


      } else if (partitionedContext.getRebalanceMode() == RebalanceMode.CUSTOMIZED) {
        CustomRebalancerContext customContext =
            resource.getRebalancerConfig().getRebalancerContext(CustomRebalancerContext.class);
        sb.append(", preferenceMap: " + customContext.getPreferenceMap(partitionId));
      }
      if (partitionedContext.anyLiveParticipant()) {
        sb.append(", anyLiveParticipant: " + partitionedContext.anyLiveParticipant());
      } else {
        sb.append(", replicaCount: " + partitionedContext.getReplicaCount());
      }
    }
View Full Code Here

        CustomRebalancerContext customContext =
            resource.getRebalancerConfig().getRebalancerContext(CustomRebalancerContext.class);
        sb.append(", preferenceMap: " + customContext.getPreferenceMap(partitionId));
      }
      if (partitionedContext.anyLiveParticipant()) {
        sb.append(", anyLiveParticipant: " + partitionedContext.anyLiveParticipant());
      } else {
        sb.append(", replicaCount: " + partitionedContext.getReplicaCount());
      }
    }
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.