public final class

RebalancerConfig

extends Object
java.lang.Object
   ↳ org.apache.helix.controller.rebalancer.context.RebalancerConfig

Class Overview

Configuration for a resource rebalancer. This contains a RebalancerContext, which contains information specific to each rebalancer.

Summary

Public Constructors
RebalancerConfig(RebalancerContext context)
Instantiate a RebalancerConfig
RebalancerConfig(ResourceConfiguration resourceConfiguration)
Instantiate from a physical ResourceConfiguration
Public Methods
static RebalancerConfig from(ResourceConfiguration resourceConfiguration)
Get a RebalancerConfig from a physical resource config
static RebalancerConfig from(RebalancerContext context)
Get a RebalancerConfig from a RebalancerContext
HelixRebalancer getRebalancer()
Get a rebalancer class instance
<T extends RebalancerContext> T getRebalancerContext(Class<T> contextClass)
Get the instantiated RebalancerContext
String getSerializedContext()
Get the rebalancer context serialized as a string
NamespacedConfig toNamespacedConfig()
Convert this to a namespaced config
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public RebalancerConfig (RebalancerContext context)

Instantiate a RebalancerConfig

Parameters
context rebalancer context

public RebalancerConfig (ResourceConfiguration resourceConfiguration)

Instantiate from a physical ResourceConfiguration

Parameters
resourceConfiguration populated ResourceConfiguration

Public Methods

public static RebalancerConfig from (ResourceConfiguration resourceConfiguration)

Get a RebalancerConfig from a physical resource config

Parameters
resourceConfiguration physical resource config
Returns
  • RebalancerConfig

public static RebalancerConfig from (RebalancerContext context)

Get a RebalancerConfig from a RebalancerContext

Parameters
context instantiated RebalancerContext
Returns
  • RebalancerConfig

public HelixRebalancer getRebalancer ()

Get a rebalancer class instance

Returns
  • Rebalancer

public T getRebalancerContext (Class<T> contextClass)

Get the instantiated RebalancerContext

Parameters
contextClass specific class of the RebalancerContext
Returns
  • RebalancerContext subclass instance, or null if conversion is not possible

public String getSerializedContext ()

Get the rebalancer context serialized as a string

Returns
  • string representing the context

public NamespacedConfig toNamespacedConfig ()

Convert this to a namespaced config

Returns
  • NamespacedConfig