Class ReplicationClient
- java.lang.Object
-
- org.apache.accumulo.core.clientImpl.ReplicationClient
-
public class ReplicationClient extends Object
-
-
Constructor Summary
Constructors Constructor Description ReplicationClient()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
executeCoordinatorWithReturn(ClientContext context, ClientExecReturn<T,ReplicationCoordinator.Client> exec)
static <T> T
executeServicerWithReturn(ClientContext context, HostAndPort tserver, ClientExecReturn<T,ReplicationServicer.Client> exec, long timeout)
static ReplicationCoordinator.Client
getCoordinatorConnection(ClientContext context)
static ReplicationCoordinator.Client
getCoordinatorConnectionWithRetry(ClientContext context)
static ReplicationServicer.Client
getServicerConnection(ClientContext context, HostAndPort server, long timeout)
Attempt a single time to create a ReplicationServicer client to the given host
-
-
-
Method Detail
-
getCoordinatorConnectionWithRetry
public static ReplicationCoordinator.Client getCoordinatorConnectionWithRetry(ClientContext context) throws AccumuloException
- Parameters:
context
- the client session for the peer replicant- Returns:
- Client to the ReplicationCoordinator service
- Throws:
AccumuloException
-
getCoordinatorConnection
public static ReplicationCoordinator.Client getCoordinatorConnection(ClientContext context)
-
getServicerConnection
public static ReplicationServicer.Client getServicerConnection(ClientContext context, HostAndPort server, long timeout) throws org.apache.thrift.transport.TTransportException
Attempt a single time to create a ReplicationServicer client to the given host- Parameters:
context
- The client session for the peer replicantserver
- Server to connect totimeout
- RPC timeout in milliseconds- Returns:
- A ReplicationServicer client to the given host in the given instance
- Throws:
org.apache.thrift.transport.TTransportException
-
executeCoordinatorWithReturn
public static <T> T executeCoordinatorWithReturn(ClientContext context, ClientExecReturn<T,ReplicationCoordinator.Client> exec) throws AccumuloException, AccumuloSecurityException
-
executeServicerWithReturn
public static <T> T executeServicerWithReturn(ClientContext context, HostAndPort tserver, ClientExecReturn<T,ReplicationServicer.Client> exec, long timeout) throws AccumuloException, AccumuloSecurityException
-
-