Tabnine Logo
AsyncTable$CoprocessorServiceBuilder
Code IndexAdd Tabnine to your IDE (free)

How to use
AsyncTable$CoprocessorServiceBuilder
in
org.apache.hadoop.hbase.client

Best Java code snippets using org.apache.hadoop.hbase.client.AsyncTable$CoprocessorServiceBuilder (Showing top 20 results out of 315)

origin: apache/hbase

  .<AggregateService, AggregateResponse> coprocessorService(AggregateService::newStub,
   (stub, controller, rpcCallback) -> stub.getMedian(controller, req, rpcCallback), callback)
  .fromRow(nullToEmpty(scan.getStartRow()), scan.includeStartRow())
  .toRow(nullToEmpty(scan.getStopRow()), scan.includeStopRow()).execute();
return future;
origin: org.apache.hbase/hbase-endpoint

  .<AggregateService, AggregateResponse> coprocessorService(AggregateService::newStub,
   (stub, controller, rpcCallback) -> stub.getMedian(controller, req, rpcCallback), callback)
  .fromRow(nullToEmpty(scan.getStartRow()), scan.includeStartRow())
  .toRow(nullToEmpty(scan.getStopRow()), scan.includeStopRow()).execute();
return future;
origin: org.apache.hbase/hbase-endpoint

  .<AggregateService, AggregateResponse> coprocessorService(AggregateService::newStub,
   (stub, controller, rpcCallback) -> stub.getAvg(controller, req, rpcCallback), callback)
  .fromRow(nullToEmpty(scan.getStartRow()), scan.includeStartRow())
  .toRow(nullToEmpty(scan.getStopRow()), scan.includeStopRow()).execute();
return future;
origin: com.aliyun.hbase/alihbase-endpoint

  .<AggregateService, AggregateResponse> coprocessorService(AggregateService::newStub,
   (stub, controller, rpcCallback) -> stub.getAvg(controller, req, rpcCallback), callback)
  .fromRow(nullToEmpty(scan.getStartRow()), scan.includeStartRow())
  .toRow(nullToEmpty(scan.getStopRow()), scan.includeStopRow()).execute();
return future;
origin: com.aliyun.hbase/alihbase-endpoint

  .<AggregateService, AggregateResponse> coprocessorService(AggregateService::newStub,
   (stub, controller, rpcCallback) -> stub.getMin(controller, req, rpcCallback), callback)
  .fromRow(nullToEmpty(scan.getStartRow()), scan.includeStartRow())
  .toRow(nullToEmpty(scan.getStopRow()), scan.includeStopRow()).execute();
return future;
origin: org.apache.hbase/hbase-endpoint

  .<AggregateService, AggregateResponse> coprocessorService(AggregateService::newStub,
   (stub, controller, rpcCallback) -> stub.getMax(controller, req, rpcCallback), callback)
  .fromRow(nullToEmpty(scan.getStartRow()), scan.includeStartRow())
  .toRow(nullToEmpty(scan.getStopRow()), scan.includeStopRow()).execute();
return future;
origin: org.apache.hbase/hbase-endpoint

  .<AggregateService, AggregateResponse> coprocessorService(AggregateService::newStub,
   (stub, controller, rpcCallback) -> stub.getSum(controller, req, rpcCallback), callback)
  .fromRow(nullToEmpty(scan.getStartRow()), scan.includeStartRow())
  .toRow(nullToEmpty(scan.getStopRow()), scan.includeStopRow()).execute();
return future;
origin: com.aliyun.hbase/alihbase-endpoint

  .<AggregateService, AggregateResponse> coprocessorService(AggregateService::newStub,
   (stub, controller, rpcCallback) -> stub.getStd(controller, req, rpcCallback), callback)
  .fromRow(nullToEmpty(scan.getStartRow()), scan.includeStartRow())
  .toRow(nullToEmpty(scan.getStopRow()), scan.includeStopRow()).execute();
return future;
origin: org.apache.hbase/hbase-endpoint

  .<AggregateService, AggregateResponse> coprocessorService(AggregateService::newStub,
   (stub, controller, rpcCallback) -> stub.getStd(controller, req, rpcCallback), callback)
  .fromRow(nullToEmpty(scan.getStartRow()), scan.includeStartRow())
  .toRow(nullToEmpty(scan.getStopRow()), scan.includeStopRow()).execute();
return future;
origin: org.apache.hbase/hbase-endpoint

public static <R, S, P extends Message, Q extends Message, T extends Message>
  CompletableFuture<Long> rowCount(AsyncTable<?> table, ColumnInterpreter<R, S, P, Q, T> ci,
    Scan scan) {
 CompletableFuture<Long> future = new CompletableFuture<>();
 AggregateRequest req;
 try {
  req = validateArgAndGetPB(scan, ci, true);
 } catch (IOException e) {
  future.completeExceptionally(e);
  return future;
 }
 AbstractAggregationCallback<Long> callback = new AbstractAggregationCallback<Long>(future) {
  private long count;
  @Override
  protected void aggregate(RegionInfo region, AggregateResponse resp) throws IOException {
   count += resp.getFirstPart(0).asReadOnlyByteBuffer().getLong();
  }
  @Override
  protected Long getFinalResult() {
   return count;
  }
 };
 table
   .<AggregateService, AggregateResponse> coprocessorService(AggregateService::newStub,
    (stub, controller, rpcCallback) -> stub.getRowNum(controller, req, rpcCallback), callback)
   .fromRow(nullToEmpty(scan.getStartRow()), scan.includeStartRow())
   .toRow(nullToEmpty(scan.getStopRow()), scan.includeStopRow()).execute();
 return future;
}
origin: com.aliyun.hbase/alihbase-endpoint

public static <R, S, P extends Message, Q extends Message, T extends Message>
  CompletableFuture<Long>
  rowCount(AsyncTable<?> table, ColumnInterpreter<R, S, P, Q, T> ci, Scan scan) {
 CompletableFuture<Long> future = new CompletableFuture<>();
 AggregateRequest req;
 try {
  req = validateArgAndGetPB(scan, ci, true);
 } catch (IOException e) {
  future.completeExceptionally(e);
  return future;
 }
 AbstractAggregationCallback<Long> callback = new AbstractAggregationCallback<Long>(future) {
  private long count;
  @Override
  protected void aggregate(RegionInfo region, AggregateResponse resp) throws IOException {
   count += resp.getFirstPart(0).asReadOnlyByteBuffer().getLong();
  }
  @Override
  protected Long getFinalResult() {
   return count;
  }
 };
 table
   .<AggregateService, AggregateResponse> coprocessorService(AggregateService::newStub,
    (stub, controller, rpcCallback) -> stub.getRowNum(controller, req, rpcCallback), callback)
   .fromRow(nullToEmpty(scan.getStartRow()), scan.includeStartRow())
   .toRow(nullToEmpty(scan.getStopRow()), scan.includeStopRow()).execute();
 return future;
}
origin: com.aliyun.hbase/alihbase-endpoint

  .<AggregateService, AggregateResponse> coprocessorService(AggregateService::newStub,
   (stub, controller, rpcCallback) -> stub.getMedian(controller, req, rpcCallback), callback)
  .fromRow(nullToEmpty(scan.getStartRow()), scan.includeStartRow())
  .toRow(nullToEmpty(scan.getStopRow()), scan.includeStopRow()).execute();
return future;
origin: com.aliyun.hbase/alihbase-endpoint

  .<AggregateService, AggregateResponse> coprocessorService(AggregateService::newStub,
   (stub, controller, rpcCallback) -> stub.getMax(controller, req, rpcCallback), callback)
  .fromRow(nullToEmpty(scan.getStartRow()), scan.includeStartRow())
  .toRow(nullToEmpty(scan.getStopRow()), scan.includeStopRow()).execute();
return future;
origin: org.apache.hbase/hbase-endpoint

  .<AggregateService, AggregateResponse> coprocessorService(AggregateService::newStub,
   (stub, controller, rpcCallback) -> stub.getMin(controller, req, rpcCallback), callback)
  .fromRow(nullToEmpty(scan.getStartRow()), scan.includeStartRow())
  .toRow(nullToEmpty(scan.getStopRow()), scan.includeStopRow()).execute();
return future;
origin: com.aliyun.hbase/alihbase-endpoint

  .<AggregateService, AggregateResponse> coprocessorService(AggregateService::newStub,
   (stub, controller, rpcCallback) -> stub.getSum(controller, req, rpcCallback), callback)
  .fromRow(nullToEmpty(scan.getStartRow()), scan.includeStartRow())
  .toRow(nullToEmpty(scan.getStopRow()), scan.includeStopRow()).execute();
return future;
origin: com.aliyun.hbase/alihbase-client

/**
 * @param endKey select regions up to and including the region containing this row
 * @param inclusive whether to include the endKey
 */
CoprocessorServiceBuilder<S, R> toRow(byte[] endKey, boolean inclusive);
origin: com.aliyun.hbase/alihbase-client

@Override
public CoprocessorServiceBuilder<S, R> fromRow(byte[] startKey, boolean inclusive) {
 builder.fromRow(startKey, inclusive);
 return this;
}
origin: com.aliyun.hbase/alihbase-client

 @Override
 public void execute() {
  builder.execute();
 }
};
origin: com.aliyun.hbase/alihbase-client

@Override
public CoprocessorServiceBuilder<S, R> toRow(byte[] endKey, boolean inclusive) {
 builder.toRow(endKey, inclusive);
 return this;
}
origin: com.aliyun.hbase/alihbase-client

/**
 * @param startKey start region selection with region containing this row
 * @param inclusive whether to include the startKey
 */
CoprocessorServiceBuilder<S, R> fromRow(byte[] startKey, boolean inclusive);
org.apache.hadoop.hbase.clientAsyncTable$CoprocessorServiceBuilder

Javadoc

Helper class for sending coprocessorService request that executes a coprocessor call on regions which are covered by a range.

If fromRow is not specified the selection will start with the first table region. If toRow is not specified the selection will continue through the last table region.

Most used methods

  • execute
    Execute the coprocessorService request. You can get the response through the CoprocessorCallback.
  • fromRow
  • toRow

Popular in Java

  • Reading from database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setScale (BigDecimal)
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JTextField (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now