@InternalApi(value="For internal usage only") 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
.
For internal use only - public for technical reasons.
Modifier and Type | Field and Description |
---|---|
protected Timer |
batchTimer |
protected static Logger |
LOG
Constant
LOG |
static byte[] |
NO_REGION
For callbacks that take a region, this is the region we will use.
|
protected BigtableOptions |
options |
protected HBaseRequestAdapter |
requestAdapter |
Constructor and Description |
---|
BatchExecutor(BigtableSession session,
HBaseRequestAdapter requestAdapter)
Constructor for BatchExecutor.
|
Modifier and Type | Method and 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) |
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 Logger LOG
LOG
public static final byte[] NO_REGION
protected final BigtableOptions options
protected final HBaseRequestAdapter requestAdapter
protected final Timer batchTimer
public BatchExecutor(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
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
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
IOException
InterruptedException
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.