voldemort.server.rebalance
Class RebalancerState

java.lang.Object
  extended by voldemort.server.rebalance.RebalancerState

public class RebalancerState
extends java.lang.Object

Store and manipulate rebalancing state. Moved out from RebalancePartitionsInfo and MetadataStore


Field Summary
protected  java.util.Map<java.lang.Integer,RebalancePartitionsInfo> stealInfoMap
           
 
Constructor Summary
RebalancerState(java.util.List<RebalancePartitionsInfo> stealInfoList)
           
 
Method Summary
static RebalancerState create(java.lang.String json)
           
 boolean equals(java.lang.Object o)
           
 RebalancePartitionsInfo find(int donorId)
           
 RebalancePartitionsInfo find(java.lang.String storeName, java.util.List<java.lang.Integer> keyPartitions, java.util.List<java.lang.Integer> nodePartitions)
           
 java.util.Collection<RebalancePartitionsInfo> getAll()
           
 int hashCode()
           
 boolean isEmpty()
           
 boolean remove(RebalancePartitionsInfo rebalancePartitionsInfo)
           
 java.lang.String toJsonString()
           
 java.lang.String toString()
           
 boolean update(RebalancePartitionsInfo rebalancePartitionsInfo)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

stealInfoMap

protected final java.util.Map<java.lang.Integer,RebalancePartitionsInfo> stealInfoMap
Constructor Detail

RebalancerState

public RebalancerState(java.util.List<RebalancePartitionsInfo> stealInfoList)
Method Detail

create

public static RebalancerState create(java.lang.String json)

toJsonString

public java.lang.String toJsonString()

isEmpty

public boolean isEmpty()

remove

public boolean remove(RebalancePartitionsInfo rebalancePartitionsInfo)

update

public boolean update(RebalancePartitionsInfo rebalancePartitionsInfo)

getAll

public java.util.Collection<RebalancePartitionsInfo> getAll()

find

public RebalancePartitionsInfo find(java.lang.String storeName,
                                    java.util.List<java.lang.Integer> keyPartitions,
                                    java.util.List<java.lang.Integer> nodePartitions)

find

public RebalancePartitionsInfo find(int donorId)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu