public static class

ClusterConfig.Delta

extends Object
java.lang.Object
   ↳ org.apache.helix.api.config.ClusterConfig.Delta

Class Overview

Update context for a ClusterConfig

Summary

Public Constructors
ClusterConfig.Delta(ClusterId clusterId)
Instantiate the delta for a cluster config
Public Methods
ClusterConfig.Delta addAlert(String alert)
Add an alert specification for the cluster.
ClusterConfig.Delta addConstraintItem(ClusterConstraints.ConstraintType type, ConstraintId constraintId, ConstraintItem item)
Add a single constraint item
ClusterConfig.Delta addStat(String stat)
Add a statistic specification to the cluster.
ClusterConfig.Delta addStateUpperBoundConstraint(Scope<?> scope, StateModelDefId stateModelDefId, State state, String dynamicUpperBound)
Add a state upper bound constraint
ClusterConfig.Delta addStateUpperBoundConstraint(Scope<?> scope, StateModelDefId stateModelDefId, State state, int upperBound)
Add a state upper bound constraint
ClusterConfig.Delta addTransitionConstraint(Scope<?> scope, StateModelDefId stateModelDefId, Transition transition, int maxInFlightTransitions)
Add a constraint on the maximum number of in-flight transitions of a certain type
ClusterConfig mergeInto(ClusterConfig orig)
Create a ClusterConfig that is the combination of an existing ClusterConfig and this delta
ClusterConfig.Delta removeAlert(String alert)
Remove an alert specification for the cluster
ClusterConfig.Delta removeConstraintItem(ClusterConstraints.ConstraintType type, ConstraintId constraintId)
Remove a single constraint item
ClusterConfig.Delta removeStat(String stat)
Remove a statistic specification from the cluster
ClusterConfig.Delta removeStateUpperBoundConstraint(Scope<?> scope, StateModelDefId stateModelDefId, State state)
Remove state upper bound constraint
ClusterConfig.Delta removeTransitionConstraint(Scope<?> scope, StateModelDefId stateModelDefId, Transition transition)
Remove a constraint on the maximum number of in-flight transitions of a certain type
ClusterConfig.Delta setAutoJoin(boolean autoJoin)
Allow or disallow participants from automatically being able to join the cluster
ClusterConfig.Delta setUserConfig(UserConfig userConfig)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ClusterConfig.Delta (ClusterId clusterId)

Instantiate the delta for a cluster config

Parameters
clusterId the cluster to update

Public Methods

public ClusterConfig.Delta addAlert (String alert)

Add an alert specification for the cluster. Existing specifications will not be overwritten

Parameters
alert string specifying the alert specification
Returns
  • Delta

public ClusterConfig.Delta addConstraintItem (ClusterConstraints.ConstraintType type, ConstraintId constraintId, ConstraintItem item)

Add a single constraint item

Parameters
type type of the constraint item
constraintId unique constraint id
item instantiated ConstraintItem
Returns
  • Delta

public ClusterConfig.Delta addStat (String stat)

Add a statistic specification to the cluster. Existing specifications will not be overwritten

Parameters
stat string specifying the stat specification
Returns
  • Delta

public ClusterConfig.Delta addStateUpperBoundConstraint (Scope<?> scope, StateModelDefId stateModelDefId, State state, String dynamicUpperBound)

Add a state upper bound constraint

Parameters
scope scope under which the constraint is valid
stateModelDefId identifier of the state model that owns the state
state the state to constrain
dynamicUpperBound the upper bound of replicas per partition in the state, can be a number, or the currently supported special bound values:
"R" - Refers to the number of replicas specified during resource creation. This allows having different replication factor for each resource without having to create a different state machine.
"N" - Refers to all nodes in the cluster. Useful for resources that need to exist on all nodes. This way one can add/remove nodes without having the change the bounds.
Returns
  • Delta

public ClusterConfig.Delta addStateUpperBoundConstraint (Scope<?> scope, StateModelDefId stateModelDefId, State state, int upperBound)

Add a state upper bound constraint

Parameters
scope scope under which the constraint is valid
stateModelDefId identifier of the state model that owns the state
state the state to constrain
upperBound maximum number of replicas per partition in the state
Returns
  • Delta

public ClusterConfig.Delta addTransitionConstraint (Scope<?> scope, StateModelDefId stateModelDefId, Transition transition, int maxInFlightTransitions)

Add a constraint on the maximum number of in-flight transitions of a certain type

Parameters
scope scope of the constraint
stateModelDefId identifies the state model containing the transition
transition the transition to constrain
maxInFlightTransitions number of allowed in-flight transitions in the scope
Returns
  • Delta

public ClusterConfig mergeInto (ClusterConfig orig)

Create a ClusterConfig that is the combination of an existing ClusterConfig and this delta

Parameters
orig the original ClusterConfig
Returns
  • updated ClusterConfig

public ClusterConfig.Delta removeAlert (String alert)

Remove an alert specification for the cluster

Parameters
alert alert specification
Returns
  • Delta

public ClusterConfig.Delta removeConstraintItem (ClusterConstraints.ConstraintType type, ConstraintId constraintId)

Remove a single constraint item

Parameters
type type of the constraint item
constraintId unique constraint id
Returns
  • Delta

public ClusterConfig.Delta removeStat (String stat)

Remove a statistic specification from the cluster

Parameters
stat statistic specification
Returns
  • Delta

public ClusterConfig.Delta removeStateUpperBoundConstraint (Scope<?> scope, StateModelDefId stateModelDefId, State state)

Remove state upper bound constraint

Parameters
scope scope under which the constraint is valid
stateModelDefId identifier of the state model that owns the state
state the state to constrain
Returns
  • Delta

public ClusterConfig.Delta removeTransitionConstraint (Scope<?> scope, StateModelDefId stateModelDefId, Transition transition)

Remove a constraint on the maximum number of in-flight transitions of a certain type

Parameters
scope scope of the constraint
stateModelDefId identifies the state model containing the transition
transition the transition to constrain
Returns
  • Delta

public ClusterConfig.Delta setAutoJoin (boolean autoJoin)

Allow or disallow participants from automatically being able to join the cluster

Parameters
autoJoin true if allowed, false if disallowed
Returns
  • Delta

public ClusterConfig.Delta setUserConfig (UserConfig userConfig)