Examples of computeNewIdealState()


Examples of org.apache.helix.controller.rebalancer.Rebalancer.computeNewIdealState()

        } else {
          rebalancer = new CustomRebalancer();
          mappingCalculator = new CustomRebalancer();
        }
        idealState =
            rebalancer.computeNewIdealState(resourceName, idealState, currentStateOutput, cache);
      }

      // Use the internal MappingCalculator interface to compute the final assignment
      // The next release will support rebalancers that compute the mapping from start to finish
      if (mappingCalculator != null) {
View Full Code Here

Examples of org.apache.helix.controller.rebalancer.Rebalancer.computeNewIdealState()

        try {
          Rebalancer balancer =
              (Rebalancer) (HelixUtil.loadClass(getClass(), rebalancerClassName).newInstance());
          balancer.init(manager);
          IdealState newIdealState =
              balancer.computeNewIdealState(resourceName, idealStateMap.get(resourceName),
                  currentStateOutput, cache);
          updatedIdealStates.put(resourceName, newIdealState);
        } catch (Exception e) {
          LOG.error("Exception while invoking custom rebalancer class:" + rebalancerClassName, e);
        }
View Full Code Here

Examples of org.apache.helix.controller.rebalancer.Rebalancer.computeNewIdealState()

      if (rebalancer != null && mappingCalculator != null) {
        try {
          HelixManager manager = event.getAttribute("helixmanager");
          rebalancer.init(manager);
          idealState =
              rebalancer.computeNewIdealState(resourceName, idealState, currentStateOutput, cache);

          // Use the internal MappingCalculator interface to compute the final assignment
          // The next release will support rebalancers that compute the mapping from start to finish
          ResourceAssignment partitionStateAssignment =
              mappingCalculator.computeBestPossiblePartitionState(cache, idealState, resource,
View Full Code Here

Examples of org.apache.helix.controller.rebalancer.Rebalancer.computeNewIdealState()

        LOG.info("resource " + resourceName + " use idealStateRebalancer " + rebalancerClassName);
        try
        {
          Rebalancer balancer = (Rebalancer) (Class.forName(rebalancerClassName).newInstance());
          balancer.init(manager);
          IdealState newIdealState = balancer.computeNewIdealState(resourceName, idealStateMap.get(resourceName), currentStateOutput, cache);
          updatedIdealStates.put(resourceName, newIdealState);
        }
        catch(Exception e)
        {
          LOG.error("Exception while invoking custom rebalancer class:" + rebalancerClassName , e);
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.