Package org.apache.helix.controller.rebalancer.config

Examples of org.apache.helix.controller.rebalancer.config.RebalancerConfig


    ResourceConfiguration configuration = new ResourceConfiguration(resourceId);
    if (resource.getUserConfig() != null) {
      configuration.addNamespacedConfig(resource.getUserConfig());
      persistConfig = true;
    }
    RebalancerConfig rebalancerConfig = resource.getRebalancerConfig();
    if (rebalancerConfig != null) {
      // only persist if this is not easily convertible to an ideal state
      configuration.addNamespacedConfig(new RebalancerConfigHolder(rebalancerConfig)
          .toNamespacedConfig());
      persistConfig = true;
View Full Code Here


  private static Resource createResource(ResourceId resourceId,
      ResourceConfiguration resourceConfiguration, IdealState idealState,
      ExternalView externalView, ResourceAssignment resourceAssignment) {
    UserConfig userConfig;
    ProvisionerConfig provisionerConfig = null;
    RebalancerConfig rebalancerConfig = null;
    if (resourceConfiguration != null) {
      userConfig = resourceConfiguration.getUserConfig();
      rebalancerConfig = resourceConfiguration.getRebalancerConfig(RebalancerConfig.class);
      provisionerConfig = resourceConfiguration.getProvisionerConfig(ProvisionerConfig.class);
    } else {
View Full Code Here

    for (ResourceId resourceId : resourceMap.keySet()) {
      if (LOG.isDebugEnabled()) {
        LOG.debug("Processing resource:" + resourceId);
      }
      ResourceConfig resourceConfig = resourceMap.get(resourceId);
      RebalancerConfig rebalancerConfig = resourceConfig.getRebalancerConfig();
      IdealState idealState = resourceConfig.getIdealState();
      StateModelDefinition stateModelDef = stateModelDefs.get(idealState.getStateModelDefId());
      ResourceAssignment resourceAssignment = null;
      // use a cached rebalancer if possible
      RebalancerRef ref = idealState.getRebalancerRef();
View Full Code Here

      }
    }

    for (ResourceId resourceId : cluster.getResourceMap().keySet()) {
      Resource resource = cluster.getResource(resourceId);
      RebalancerConfig rebalancerCfg = resource.getRebalancerConfig();

      ResourceConfig.Builder resCfgBuilder = new ResourceConfig.Builder(resourceId);
      resCfgBuilder.schedulerTaskConfig(resource.getSchedulerTaskConfig());
      resCfgBuilder.rebalancerConfig(rebalancerCfg);
      resCfgBuilder.provisionerConfig(resource.getProvisionerConfig());
View Full Code Here

      if (provisionerConfig != null) {
        updatedResourceConfig.addNamespacedConfig(new ProvisionerConfigHolder(provisionerConfig)
            .toNamespacedConfig());
        addedAnything = true;
      }
      RebalancerConfig rebalancerConfig = deltaConfig.getRebalancerConfig();
      if (rebalancerConfig != null) {
        updatedResourceConfig.addNamespacedConfig(new RebalancerConfigHolder(rebalancerConfig)
            .toNamespacedConfig());
        addedAnything = true;
      }
View Full Code Here

TOP

Related Classes of org.apache.helix.controller.rebalancer.config.RebalancerConfig

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.