@InternalExtensionOnly public class BulkRead extends Object
ReadRowsRequest
s with a single
row key into a single ReadRowsRequest
with a RowSet
which will result in fewer round trips. This class is not thread
safe, and requires calling classes to make it thread safe.Modifier and Type | Field and Description |
---|---|
protected static Logger |
LOG
Constant
LOG |
Constructor and Description |
---|
BulkRead(IBigtableDataClient client,
BigtableTableName tableName,
int batchSizes,
ExecutorService threadPool)
Constructor for BulkRead.
|
Modifier and Type | Method and Description |
---|---|
com.google.api.core.ApiFuture<FlatRow> |
add(com.google.cloud.bigtable.data.v2.models.Query query)
Adds the key in the request to a batch read.
|
void |
flush()
Sends all remaining requests to the server.
|
int |
getBatchSizes()
For internal use only - public for technical reasons.
|
protected static final Logger LOG
LOG
@InternalApi(value="For internal usage only") public BulkRead(IBigtableDataClient client, BigtableTableName tableName, int batchSizes, ExecutorService threadPool)
client
- a IBigtableDataClient
object.tableName
- a BigtableTableName
object.batchSizes
- The number of keys to lookup per RPC.threadPool
- the ExecutorService
to execute the batched reads on
For internal use only - public for technical reasons.
public com.google.api.core.ApiFuture<FlatRow> add(com.google.cloud.bigtable.data.v2.models.Query query)
query
- a Query
with a single row key.ApiFuture
that will be populated with the FlatRow
that corresponds to
the requestpublic void flush()
@InternalApi(value="For internal usage only") public int getBatchSizes()