Package org.apache.hadoop.hbase.client
Class AsyncAdminClientUtils
java.lang.Object
org.apache.hadoop.hbase.client.AsyncAdminClientUtils
Additional Asynchronous Admin capabilities for clients.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <S,
R> CompletableFuture<Map<ServerName, Object>> coprocessorServiceOnAllRegionServers
(AsyncAdmin asyncAdmin, Function<org.apache.hbase.thirdparty.com.google.protobuf.RpcChannel, S> stubMaker, ServiceCaller<S, R> callable) Execute the given coprocessor call on all region servers.
-
Constructor Details
-
AsyncAdminClientUtils
private AsyncAdminClientUtils()
-
-
Method Details
-
coprocessorServiceOnAllRegionServers
public static <S,R> CompletableFuture<Map<ServerName,Object>> coprocessorServiceOnAllRegionServers(AsyncAdmin asyncAdmin, Function<org.apache.hbase.thirdparty.com.google.protobuf.RpcChannel, S> stubMaker, ServiceCaller<S, R> callable) Execute the given coprocessor call on all region servers.The
stubMaker
is just a delegation to thenewStub
call. Usually it is only a one line lambda expression, like:channel -> xxxService.newStub(channel)
- Type Parameters:
S
- the type of the asynchronous stubR
- the type of the return value- Parameters:
asyncAdmin
- the asynchronous administrative API for HBase.stubMaker
- a delegation to the actualnewStub
call.callable
- a delegation to the actual protobuf rpc call. See the comment ofServiceCaller
for more details.- Returns:
- Map of each region server to its result of the protobuf rpc call, wrapped by a
CompletableFuture
. - See Also:
-