|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvoldemort.client.protocol.admin.AdminClient.RebalancingOperations
public class AdminClient.RebalancingOperations
Encapsulates all operations concerning cluster expansion
Constructor Summary | |
---|---|
AdminClient.RebalancingOperations()
|
Method Summary | |
---|---|
void |
checkEachServerInNormalState(Cluster cluster)
Check the execution state of the server by checking the state of MetadataStore.VoldemortState This function checks if the nodes are all in normal state ( MetadataStore.VoldemortState.NORMAL_SERVER ). |
void |
deleteStoreRebalanceState(int donorNodeId,
int stealerNodeId,
java.lang.String storeName)
Delete the rebalancing metadata related to the store on the stealer node |
java.util.List<StoreDefinition> |
getCurrentStoreDefinitions(Cluster cluster)
Given the cluster metadata, retrieves the list of store definitions. |
Versioned<Cluster> |
getLatestCluster(java.util.List<java.lang.Integer> requiredNodes)
Get the latest cluster from all available nodes in the cluster Throws exception if: A) Any node in the required nodes list fails to respond. B) Cluster is in inconsistent state with concurrent versions for cluster metadata on any two nodes. |
Versioned<MetadataStore.VoldemortState> |
getRemoteServerState(int nodeId)
Retrieve the server MetadataStore.VoldemortState from a
remote node. |
int |
rebalanceNode(RebalanceTaskInfo stealInfo)
Rebalance a stealer-donor node pair for a set of stores. |
void |
rebalanceStateChange(Cluster existingCluster,
Cluster transitionCluster,
java.util.List<StoreDefinition> existingStoreDefs,
java.util.List<StoreDefinition> targetStoreDefs,
java.util.List<RebalanceTaskInfo> rebalanceTaskPlanList,
boolean swapRO,
boolean changeClusterMetadata,
boolean changeRebalanceState,
boolean rollback,
boolean failEarly)
Used in rebalancing to indicate change in states. |
void |
validateReadOnlyStores(Cluster cluster,
java.util.List<StoreDefinition> storeDefs)
Given a list of store definitions, cluster and admin client returns a boolean indicating if all RO stores are in the correct format. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AdminClient.RebalancingOperations()
Method Detail |
---|
public int rebalanceNode(RebalanceTaskInfo stealInfo)
stealInfo
- Partition steal information
public void deleteStoreRebalanceState(int donorNodeId, int stealerNodeId, java.lang.String storeName)
donorNodeId
- The donor node idstealerNodeId
- The stealer node idstoreName
- The name of the storepublic Versioned<MetadataStore.VoldemortState> getRemoteServerState(int nodeId)
MetadataStore.VoldemortState
from a
remote node.
nodeId
- The node from which we want to retrieve the state
public void rebalanceStateChange(Cluster existingCluster, Cluster transitionCluster, java.util.List<StoreDefinition> existingStoreDefs, java.util.List<StoreDefinition> targetStoreDefs, java.util.List<RebalanceTaskInfo> rebalanceTaskPlanList, boolean swapRO, boolean changeClusterMetadata, boolean changeRebalanceState, boolean rollback, boolean failEarly)
| swapRO | changeClusterMetadata | changeRebalanceState | Order | | f | t | t | cluster -> rebalance | | f | f | t | rebalance | | t | t | f | cluster -> swap | | t | t | t | cluster -> swap -> rebalance |Similarly for rollback, order means the following:
| swapRO | changeClusterMetadata | changeRebalanceState | Order | | f | t | t | remove from rebalance -> cluster | | f | f | t | remove from rebalance | | t | t | f | cluster -> swap | | t | t | t | remove from rebalance -> cluster -> swap |
existingCluster
- Current clustertransitionCluster
- Transition clusterexistingStoreDefs
- current store defstargetStoreDefs
- transition store defsrebalanceTaskPlanList
- The list of rebalance partition info
plansswapRO
- Boolean indicating if we need to swap RO storeschangeClusterMetadata
- Boolean indicating if we need to change
cluster metadatachangeRebalanceState
- Boolean indicating if we need to change
rebalancing staterollback
- Do we want to do a rollback step in case of failures?failEarly
- Do we want to fail early while doing state change?public Versioned<Cluster> getLatestCluster(java.util.List<java.lang.Integer> requiredNodes)
requiredNodes
- List of nodes from which we definitely need an
answer
public void checkEachServerInNormalState(Cluster cluster)
MetadataStore.VoldemortState
MetadataStore.VoldemortState.NORMAL_SERVER
).
cluster
- Cluster metadata whose nodes we are checking
VoldemortRebalancingException
- if any node is not in normal
statepublic java.util.List<StoreDefinition> getCurrentStoreDefinitions(Cluster cluster)
cluster
- The cluster metadata
public void validateReadOnlyStores(Cluster cluster, java.util.List<StoreDefinition> storeDefs)
cluster
- Cluster metadatastoreDefs
- Complete list of store definitions
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |