Class AsyncAdminClientUtils

java.lang.Object
org.apache.hadoop.hbase.client.AsyncAdminClientUtils

@Public public final class AsyncAdminClientUtils extends Object
Additional Asynchronous Admin capabilities for clients.
  • Constructor Details

  • Method Details

    • coprocessorServiceOnAllRegionServers

      public static <S, R> CompletableFuture<Map<ServerName,Object>> coprocessorServiceOnAllRegionServers(AsyncAdmin asyncAdmin, Function<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 the newStub call. Usually it is only a one line lambda expression, like:

       channel -> xxxService.newStub(channel)
       
      Type Parameters:
      S - the type of the asynchronous stub
      R - the type of the return value
      Parameters:
      asyncAdmin - the asynchronous administrative API for HBase.
      stubMaker - a delegation to the actual newStub call.
      callable - a delegation to the actual protobuf rpc call. See the comment of ServiceCaller for more details.
      Returns:
      Map of each region server to its result of the protobuf rpc call, wrapped by a CompletableFuture.
      See Also: