public class BatchExecutor extends Object
Table.batch(List, Object[])
.
Table.put(List)
and
Table.get(List)
. This class relies on implementations found
in BulkRead
and in BigtableBufferedMutatorHelper
.Modifier and Type | Field | Description |
---|---|---|
protected com.google.cloud.bigtable.metrics.Timer |
batchTimer |
|
protected static com.google.cloud.bigtable.config.Logger |
LOG |
Constant
LOG |
static byte[] |
NO_REGION |
For callbacks that take a region, this is the region we will use.
|
protected com.google.cloud.bigtable.config.BigtableOptions |
options |
|
protected HBaseRequestAdapter |
requestAdapter |
Constructor | Description |
---|---|
BatchExecutor(com.google.cloud.bigtable.grpc.BigtableSession session,
HBaseRequestAdapter requestAdapter) |
Constructor for BatchExecutor.
|
Modifier and Type | Method | Description |
---|---|---|
org.apache.hadoop.hbase.client.Result[] |
batch(List<? extends org.apache.hadoop.hbase.client.Row> actions) |
batch.
|
void |
batch(List<? extends org.apache.hadoop.hbase.client.Row> actions,
Object[] results) |
batch.
|
<R> void |
batchCallback(List<? extends org.apache.hadoop.hbase.client.Row> actions,
Object[] results,
org.apache.hadoop.hbase.client.coprocessor.Batch.Callback<R> callback) |
Implementation of
HTable.batchCallback(List, Object[], Batch.Callback) |
boolean[] |
exists(List<org.apache.hadoop.hbase.client.Get> gets) |
Implementation of
Table.existsAll(List) . |
<R> List<com.google.api.core.ApiFuture<?>> |
issueAsyncRowRequests(List<? extends org.apache.hadoop.hbase.client.Row> actions,
Object[] results,
org.apache.hadoop.hbase.client.coprocessor.Batch.Callback<R> callback) |
protected static final com.google.cloud.bigtable.config.Logger LOG
LOG
public static final byte[] NO_REGION
protected final com.google.cloud.bigtable.config.BigtableOptions options
protected final HBaseRequestAdapter requestAdapter
protected final com.google.cloud.bigtable.metrics.Timer batchTimer
public BatchExecutor(com.google.cloud.bigtable.grpc.BigtableSession session, HBaseRequestAdapter requestAdapter)
session
- a BigtableSession
object.requestAdapter
- a HBaseRequestAdapter
object.public void batch(List<? extends org.apache.hadoop.hbase.client.Row> actions, @Nullable Object[] results) throws IOException, InterruptedException
batch.
actions
- a List
object.results
- an array of Object
objects.IOException
- if any.InterruptedException
- if any.public <R> List<com.google.api.core.ApiFuture<?>> issueAsyncRowRequests(List<? extends org.apache.hadoop.hbase.client.Row> actions, Object[] results, org.apache.hadoop.hbase.client.coprocessor.Batch.Callback<R> callback)
public org.apache.hadoop.hbase.client.Result[] batch(List<? extends org.apache.hadoop.hbase.client.Row> actions) throws IOException
batch.
actions
- a List
object.Result
objects.IOException
- if any.public <R> void batchCallback(List<? extends org.apache.hadoop.hbase.client.Row> actions, Object[] results, org.apache.hadoop.hbase.client.coprocessor.Batch.Callback<R> callback) throws IOException, InterruptedException
HTable.batchCallback(List, Object[], Batch.Callback)
R
- a R object.actions
- a List
object.results
- an array of Object
objects.callback
- a Batch.Callback
object.IOException
- if any.InterruptedException
- if any.public boolean[] exists(List<org.apache.hadoop.hbase.client.Get> gets) throws IOException
Table.existsAll(List)
.gets
- a List
object.Boolean
objects.IOException
- if any.