voldemort.client.protocol.admin
Class AdminClient

java.lang.Object
  extended by voldemort.client.protocol.admin.AdminClient

public class AdminClient
extends java.lang.Object

AdminClient is intended for administrative functionality that is useful and often needed, but should be used sparingly (if at all) at the application level.

Some of the uses of AdminClient include


Nested Class Summary
 class AdminClient.BulkStreamingFetchOperations
          Encapsulates all the operations to forklift data from the cluster
 class AdminClient.HelperOperations
          Encapsulates helper methods used across the admin client
 class AdminClient.MetadataManagementOperations
          Encapsulates all operations that deal with cluster.xml and stores.xml
 class AdminClient.QuotaManagementOperations
           
 class AdminClient.ReadOnlySpecificOperations
          Encapsulates all operations specific to read-only stores alone
 class AdminClient.RebalancingOperations
          Encapsulates all operations concerning cluster expansion
 class AdminClient.ReplicationOperations
           
 class AdminClient.RestoreOperations
          Encapsulates all operations to restore data in the cluster
 class AdminClient.RPCOperations
          Encapsulates all the RPC helper methods
 class AdminClient.StoreMaintenanceOperations
          Encapsulates all operations that aid in performing maintenance on the actual store's data
 class AdminClient.StoreManagementOperations
          Encapsulates all operations related to store management (addition, deletion)
 class AdminClient.StoreOperations
           
 class AdminClient.StreamingOperations
          Encapsulates all steaming operations that actually read and write key-value pairs into the cluster
 
Field Summary
 AdminClient.BulkStreamingFetchOperations bulkFetchOps
           
 AdminClient.HelperOperations helperOps
           
 AdminClient.MetadataManagementOperations metadataMgmtOps
           
 AdminClient.QuotaManagementOperations quotaMgmtOps
           
 AdminClient.ReadOnlySpecificOperations readonlyOps
           
 AdminClient.RebalancingOperations rebalanceOps
           
 AdminClient.ReplicationOperations replicaOps
           
 AdminClient.RestoreOperations restoreOps
           
static java.util.List<java.lang.String> restoreStoreEngineBlackList
           
 AdminClient.RPCOperations rpcOps
           
 AdminClient.StoreManagementOperations storeMgmtOps
           
 AdminClient.StoreMaintenanceOperations storeMntOps
           
 AdminClient.StoreOperations storeOps
           
 AdminClient.StreamingOperations streamingOps
           
 
Constructor Summary
AdminClient(Cluster cluster, AdminClientConfig adminClientConfig, ClientConfig clientConfig)
          Create an instance of AdminClient given a Cluster object.
AdminClient(java.lang.String bootstrapURL, AdminClientConfig adminClientConfig, ClientConfig clientConfig)
          Create an instance of AdminClient given a URL of a node in the cluster.
AdminClient(java.lang.String bootstrapURL, AdminClientConfig adminClientConfig, ClientConfig clientConfig, int zoneID)
          Wrapper for the actual AdminClient constructor given the URL of a node in the cluster.
 
Method Summary
 void close()
          Stop the AdminClient cleanly freeing all resources.
static AdminClient createTempAdminClient(VoldemortConfig voldemortConfig, Cluster cluster, int numConnPerNode)
          Helper method to construct an AdminClient with "good" default settings based upon a VoldemortConfig.
 Cluster getAdminClientCluster()
          Get the cluster info AdminClient is using.
 void setAdminClientCluster(Cluster cluster)
          Set cluster info for AdminClient to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

restoreStoreEngineBlackList

public static final java.util.List<java.lang.String> restoreStoreEngineBlackList

helperOps

public final AdminClient.HelperOperations helperOps

replicaOps

public final AdminClient.ReplicationOperations replicaOps

rpcOps

public final AdminClient.RPCOperations rpcOps

metadataMgmtOps

public final AdminClient.MetadataManagementOperations metadataMgmtOps

storeMgmtOps

public final AdminClient.StoreManagementOperations storeMgmtOps

storeMntOps

public final AdminClient.StoreMaintenanceOperations storeMntOps

bulkFetchOps

public final AdminClient.BulkStreamingFetchOperations bulkFetchOps

streamingOps

public final AdminClient.StreamingOperations streamingOps

storeOps

public final AdminClient.StoreOperations storeOps

restoreOps

public final AdminClient.RestoreOperations restoreOps

rebalanceOps

public final AdminClient.RebalancingOperations rebalanceOps

readonlyOps

public final AdminClient.ReadOnlySpecificOperations readonlyOps

quotaMgmtOps

public final AdminClient.QuotaManagementOperations quotaMgmtOps
Constructor Detail

AdminClient

public AdminClient(java.lang.String bootstrapURL,
                   AdminClientConfig adminClientConfig,
                   ClientConfig clientConfig)
Create an instance of AdminClient given a URL of a node in the cluster. The bootstrap URL is used to get the cluster metadata.

Parameters:
bootstrapURL - URL pointing to the bootstrap node
adminClientConfig - Configuration for AdminClient specifying client parameters eg.
  • number of threads
  • number of sockets per node
  • socket buffer size

AdminClient

public AdminClient(Cluster cluster,
                   AdminClientConfig adminClientConfig,
                   ClientConfig clientConfig)
Create an instance of AdminClient given a Cluster object.

Parameters:
cluster - Initialized cluster object, describing the nodes we wish to contact
adminClientConfig - Configuration for AdminClient specifying client parameters eg.
  • number of threads
  • number of sockets per node
  • socket buffer size

AdminClient

public AdminClient(java.lang.String bootstrapURL,
                   AdminClientConfig adminClientConfig,
                   ClientConfig clientConfig,
                   int zoneID)
Wrapper for the actual AdminClient constructor given the URL of a node in the cluster.

Parameters:
bootstrapURL - URL pointing to the bootstrap node
adminClientConfig - Configuration for AdminClient specifying client parameters eg.
  • number of threads
  • number of sockets per node
  • socket buffer size
zoneID - The primary Zone ID for the purpose of the SystemStore
Method Detail

close

public void close()
Stop the AdminClient cleanly freeing all resources.


setAdminClientCluster

public void setAdminClientCluster(Cluster cluster)
Set cluster info for AdminClient to use.

Parameters:
cluster - Set the current cluster

getAdminClientCluster

public Cluster getAdminClientCluster()
Get the cluster info AdminClient is using.

Returns:
Returns the current cluster being used by the admin client

createTempAdminClient

public static AdminClient createTempAdminClient(VoldemortConfig voldemortConfig,
                                                Cluster cluster,
                                                int numConnPerNode)
Helper method to construct an AdminClient with "good" default settings based upon a VoldemortConfig. This helper is intended for use by server-side processes such as rebalancing, restore, and so on.

Parameters:
voldemortConfig -
cluster -
numConnPerNode -
Returns:
newly constructed AdminClient


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