Closeable
, AutoCloseable
, org.apache.hadoop.hbase.client.BufferedMutator
public class BigtableBufferedMutator extends Object implements org.apache.hadoop.hbase.client.BufferedMutator
BufferedMutator
implementation.Modifier and Type | Field | Description |
---|---|---|
protected static com.google.cloud.bigtable.config.Logger |
LOG |
Constructor | Description |
---|---|
BigtableBufferedMutator(HBaseRequestAdapter adapter,
org.apache.hadoop.conf.Configuration configuration,
com.google.cloud.bigtable.grpc.BigtableSession session,
org.apache.hadoop.hbase.client.BufferedMutator.ExceptionListener listener) |
Constructor for BigtableBufferedMutator.
|
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
|
void |
flush() |
|
org.apache.hadoop.conf.Configuration |
getConfiguration() |
|
org.apache.hadoop.hbase.TableName |
getName() |
|
long |
getWriteBufferSize() |
|
boolean |
hasInflightRequests() |
hasInflightRequests.
|
void |
mutate(List<? extends org.apache.hadoop.hbase.client.Mutation> mutations) |
|
void |
mutate(org.apache.hadoop.hbase.client.Mutation mutation) |
Being a Mutation.
|
public BigtableBufferedMutator(HBaseRequestAdapter adapter, org.apache.hadoop.conf.Configuration configuration, com.google.cloud.bigtable.grpc.BigtableSession session, org.apache.hadoop.hbase.client.BufferedMutator.ExceptionListener listener)
Constructor for BigtableBufferedMutator.
adapter
- Converts HBase objects to Bigtable protosconfiguration
- For Additional configuration. TODO: move this to optionslistener
- Handles exceptions. By default, it just throws the exception.session
- a BigtableSession
to get BigtableOptions
, AsyncExecutor
and BulkMutation
objects from
starting the async operations on the BigtableDataClient.public void close() throws IOException
close
in interface AutoCloseable
close
in interface org.apache.hadoop.hbase.client.BufferedMutator
close
in interface Closeable
IOException
public void flush() throws IOException
flush
in interface org.apache.hadoop.hbase.client.BufferedMutator
IOException
public org.apache.hadoop.conf.Configuration getConfiguration()
getConfiguration
in interface org.apache.hadoop.hbase.client.BufferedMutator
public org.apache.hadoop.hbase.TableName getName()
getName
in interface org.apache.hadoop.hbase.client.BufferedMutator
public long getWriteBufferSize()
getWriteBufferSize
in interface org.apache.hadoop.hbase.client.BufferedMutator
public void mutate(List<? extends org.apache.hadoop.hbase.client.Mutation> mutations) throws IOException
mutate
in interface org.apache.hadoop.hbase.client.BufferedMutator
IOException
public void mutate(org.apache.hadoop.hbase.client.Mutation mutation) throws IOException
maxInflightRpcs
RPCs in flight
2) There are more than getWriteBufferSize()
bytes pendingmutate
in interface org.apache.hadoop.hbase.client.BufferedMutator
IOException
public boolean hasInflightRequests()
hasInflightRequests.