voldemort.client.protocol.admin
Class AdminClient.HelperOperations

java.lang.Object
  extended by voldemort.client.protocol.admin.AdminClient.HelperOperations
Enclosing class:
AdminClient

public class AdminClient.HelperOperations
extends java.lang.Object

Encapsulates helper methods used across the admin client


Constructor Summary
AdminClient.HelperOperations()
           
 
Method Summary
 java.util.Map<java.lang.Integer,java.util.HashMap<java.lang.Integer,java.util.List<java.lang.Integer>>> getReplicationMapping(int restoringNode, Cluster cluster, StoreDefinition storeDef)
          For a particular node, finds out all the [replica, partition] tuples it needs to steal in order to be brought back to normal state
 java.util.Map<java.lang.Integer,java.util.HashMap<java.lang.Integer,java.util.List<java.lang.Integer>>> getReplicationMapping(int restoringNode, Cluster cluster, StoreDefinition storeDef, int zoneId)
          For a particular node, finds out all the [replica, partition] tuples it needs to steal in order to be brought back to normal state
 void throwException(VProto.Error error)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdminClient.HelperOperations

public AdminClient.HelperOperations()
Method Detail

getReplicationMapping

public java.util.Map<java.lang.Integer,java.util.HashMap<java.lang.Integer,java.util.List<java.lang.Integer>>> getReplicationMapping(int restoringNode,
                                                                                                                                     Cluster cluster,
                                                                                                                                     StoreDefinition storeDef)
For a particular node, finds out all the [replica, partition] tuples it needs to steal in order to be brought back to normal state

Parameters:
restoringNode - The id of the node which needs to be restored
cluster - The cluster definition
storeDef - The store definition to use
Returns:
Map of node id to map of replica type and corresponding partition list

getReplicationMapping

public java.util.Map<java.lang.Integer,java.util.HashMap<java.lang.Integer,java.util.List<java.lang.Integer>>> getReplicationMapping(int restoringNode,
                                                                                                                                     Cluster cluster,
                                                                                                                                     StoreDefinition storeDef,
                                                                                                                                     int zoneId)
For a particular node, finds out all the [replica, partition] tuples it needs to steal in order to be brought back to normal state

Parameters:
restoringNode - The id of the node which needs to be restored
cluster - The cluster definition
storeDef - The store definition to use
zoneId - zone from which nodes are chosen, -1 means no zone preference
Returns:
Map of node id to map of replica type and corresponding partition list

throwException

public void throwException(VProto.Error error)


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