com.google.cloud.bigtable.hbase
Class AbstractBigtableTable
- java.lang.Object
-
- com.google.cloud.bigtable.hbase.AbstractBigtableTable
-
- All Implemented Interfaces:
- Closeable, AutoCloseable, Table
- Direct Known Subclasses:
- BigtableTable
public abstract class AbstractBigtableTable extends Object implements Table
BigtableTable class. Scan methods return rows in key order.- Version:
- $Id: $Id
- Author:
- sduskis
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.client.Table
Table.CheckAndMutateBuilder
-
-
Field Summary
Fields Modifier and Type Field and Description protected AbstractBigtableConnection
bigtableConnection
protected IBigtableDataClient
clientWrapper
protected HBaseRequestAdapter
hbaseAdapter
protected static Logger
LOG
ConstantLOG
protected BigtableOptions
options
protected TableName
tableName
-
Constructor Summary
Constructors Constructor and Description AbstractBigtableTable(AbstractBigtableConnection bigtableConnection, HBaseRequestAdapter hbaseAdapter)
Constructed by BigtableConnection
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description Result
append(Append append)
Object[]
batch(List<? extends Row> actions)
Deprecated.void
batch(List<? extends Row> actions, Object[] results)
<R> Object[]
batchCallback(List<? extends Row> actions, Batch.Callback<R> callback)
Deprecated.<R> void
batchCallback(List<? extends Row> actions, Object[] results, Batch.Callback<R> callback)
<R extends org.apache.hadoop.hbase.shaded.com.google.protobuf.Message>
Map<byte[],R>batchCoprocessorService(org.apache.hadoop.hbase.shaded.com.google.protobuf.Descriptors.MethodDescriptor methodDescriptor, org.apache.hadoop.hbase.shaded.com.google.protobuf.Message message, byte[] bytes, byte[] bytes2, R r)
<R extends org.apache.hadoop.hbase.shaded.com.google.protobuf.Message>
voidbatchCoprocessorService(org.apache.hadoop.hbase.shaded.com.google.protobuf.Descriptors.MethodDescriptor methodDescriptor, org.apache.hadoop.hbase.shaded.com.google.protobuf.Message message, byte[] bytes, byte[] bytes2, R r, Batch.Callback<R> rCallback)
boolean
checkAndDelete(byte[] row, byte[] family, byte[] qualifier, byte[] value, Delete delete)
boolean
checkAndDelete(byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, byte[] value, Delete delete)
boolean
checkAndMutate(byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, byte[] value, RowMutations rm)
boolean
checkAndPut(byte[] row, byte[] family, byte[] qualifier, byte[] value, Put put)
boolean
checkAndPut(byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, byte[] value, Put put)
void
close()
protected Result
convertToResult(FlatRow row)
CoprocessorRpcChannel
coprocessorService(byte[] row)
<T extends org.apache.hadoop.hbase.shaded.com.google.protobuf.Service,R>
Map<byte[],R>coprocessorService(Class<T> service, byte[] startKey, byte[] endKey, Batch.Call<T,R> callable)
<T extends org.apache.hadoop.hbase.shaded.com.google.protobuf.Service,R>
voidcoprocessorService(Class<T> service, byte[] startKey, byte[] endKey, Batch.Call<T,R> callable, Batch.Callback<R> callback)
void
delete(Delete delete)
void
delete(List<Delete> deletes)
boolean
exists(Get get)
boolean[]
existsAll(List<Get> gets)
Result
get(Get get)
Result[]
get(List<Get> gets)
protected BatchExecutor
getBatchExecutor()
Getter for the fieldbatchExecutor
.org.apache.hadoop.conf.Configuration
getConfiguration()
TableName
getName()
int
getOperationTimeout()
int
getReadRpcTimeout()
int
getRpcTimeout()
ResultScanner
getScanner(byte[] family)
ResultScanner
getScanner(byte[] family, byte[] qualifier)
ResultScanner
getScanner(Scan scan)
HTableDescriptor
getTableDescriptor()
long
getWriteBufferSize()
Deprecated.int
getWriteRpcTimeout()
static boolean
hasWhileMatchFilter(Filter filter)
Result
increment(Increment increment)
long
incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount)
long
incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount, Durability durability)
void
mutateRow(RowMutations rm)
void
put(List<Put> puts)
void
put(Put put)
void
setOperationTimeout(int i)
void
setReadRpcTimeout(int i)
void
setRpcTimeout(int i)
void
setWriteBufferSize(long writeBufferSize)
Deprecated.void
setWriteRpcTimeout(int i)
String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.hadoop.hbase.client.Table
batchCoprocessorService, batchCoprocessorService, checkAndDelete, checkAndMutate, checkAndMutate, checkAndPut, coprocessorService, coprocessorService, exists, getDescriptor, getOperationTimeout, getReadRpcTimeout, getRpcTimeout, getWriteRpcTimeout
-
-
-
-
Field Detail
-
LOG
protected static final Logger LOG
ConstantLOG
-
tableName
protected final TableName tableName
-
options
protected final BigtableOptions options
-
hbaseAdapter
protected final HBaseRequestAdapter hbaseAdapter
-
clientWrapper
protected final IBigtableDataClient clientWrapper
-
bigtableConnection
protected final AbstractBigtableConnection bigtableConnection
-
-
Constructor Detail
-
AbstractBigtableTable
public AbstractBigtableTable(AbstractBigtableConnection bigtableConnection, HBaseRequestAdapter hbaseAdapter)
Constructed by BigtableConnection- Parameters:
bigtableConnection
- aAbstractBigtableConnection
object.hbaseAdapter
- aHBaseRequestAdapter
object.
-
-
Method Detail
-
getConfiguration
public final org.apache.hadoop.conf.Configuration getConfiguration()
- Specified by:
getConfiguration
in interfaceTable
-
getTableDescriptor
public HTableDescriptor getTableDescriptor() throws IOException
- Specified by:
getTableDescriptor
in interfaceTable
- Throws:
IOException
-
exists
public boolean exists(Get get) throws IOException
- Specified by:
exists
in interfaceTable
- Throws:
IOException
-
existsAll
public boolean[] existsAll(List<Get> gets) throws IOException
- Specified by:
existsAll
in interfaceTable
- Throws:
IOException
-
batch
public void batch(List<? extends Row> actions, Object[] results) throws IOException, InterruptedException
- Specified by:
batch
in interfaceTable
- Throws:
IOException
InterruptedException
-
batch
@Deprecated public Object[] batch(List<? extends Row> actions) throws IOException, InterruptedException
Deprecated.- Throws:
IOException
InterruptedException
-
batchCallback
public <R> void batchCallback(List<? extends Row> actions, Object[] results, Batch.Callback<R> callback) throws IOException, InterruptedException
- Specified by:
batchCallback
in interfaceTable
- Throws:
IOException
InterruptedException
-
batchCallback
@Deprecated public <R> Object[] batchCallback(List<? extends Row> actions, Batch.Callback<R> callback) throws IOException, InterruptedException
Deprecated.- Throws:
IOException
InterruptedException
-
get
public Result[] get(List<Get> gets) throws IOException
- Specified by:
get
in interfaceTable
- Throws:
IOException
-
get
public Result get(Get get) throws IOException
- Specified by:
get
in interfaceTable
- Throws:
IOException
-
getScanner
public ResultScanner getScanner(Scan scan) throws IOException
- Specified by:
getScanner
in interfaceTable
- Throws:
IOException
-
hasWhileMatchFilter
public static boolean hasWhileMatchFilter(Filter filter)
-
getScanner
public ResultScanner getScanner(byte[] family) throws IOException
- Specified by:
getScanner
in interfaceTable
- Throws:
IOException
-
getScanner
public ResultScanner getScanner(byte[] family, byte[] qualifier) throws IOException
- Specified by:
getScanner
in interfaceTable
- Throws:
IOException
-
put
public void put(Put put) throws IOException
- Specified by:
put
in interfaceTable
- Throws:
IOException
-
put
public void put(List<Put> puts) throws IOException
- Specified by:
put
in interfaceTable
- Throws:
IOException
-
checkAndPut
public boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier, byte[] value, Put put) throws IOException
- Specified by:
checkAndPut
in interfaceTable
- Throws:
IOException
-
checkAndPut
public boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, byte[] value, Put put) throws IOException
- Specified by:
checkAndPut
in interfaceTable
- Throws:
IOException
-
delete
public void delete(Delete delete) throws IOException
- Specified by:
delete
in interfaceTable
- Throws:
IOException
-
delete
public void delete(List<Delete> deletes) throws IOException
- Specified by:
delete
in interfaceTable
- Throws:
IOException
-
checkAndDelete
public boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier, byte[] value, Delete delete) throws IOException
- Specified by:
checkAndDelete
in interfaceTable
- Throws:
IOException
-
checkAndDelete
public boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, byte[] value, Delete delete) throws IOException
- Specified by:
checkAndDelete
in interfaceTable
- Throws:
IOException
-
checkAndMutate
public boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, byte[] value, RowMutations rm) throws IOException
- Specified by:
checkAndMutate
in interfaceTable
- Throws:
IOException
-
mutateRow
public void mutateRow(RowMutations rm) throws IOException
- Specified by:
mutateRow
in interfaceTable
- Throws:
IOException
-
append
public Result append(Append append) throws IOException
- Specified by:
append
in interfaceTable
- Throws:
IOException
-
increment
public Result increment(Increment increment) throws IOException
- Specified by:
increment
in interfaceTable
- Throws:
IOException
-
incrementColumnValue
public long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount) throws IOException
- Specified by:
incrementColumnValue
in interfaceTable
- Throws:
IOException
-
incrementColumnValue
public long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount, Durability durability) throws IOException
- Specified by:
incrementColumnValue
in interfaceTable
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceTable
- Throws:
IOException
-
coprocessorService
public CoprocessorRpcChannel coprocessorService(byte[] row)
- Specified by:
coprocessorService
in interfaceTable
-
coprocessorService
public <T extends org.apache.hadoop.hbase.shaded.com.google.protobuf.Service,R> Map<byte[],R> coprocessorService(Class<T> service, byte[] startKey, byte[] endKey, Batch.Call<T,R> callable) throws org.apache.hadoop.hbase.shaded.com.google.protobuf.ServiceException, Throwable
-
coprocessorService
public <T extends org.apache.hadoop.hbase.shaded.com.google.protobuf.Service,R> void coprocessorService(Class<T> service, byte[] startKey, byte[] endKey, Batch.Call<T,R> callable, Batch.Callback<R> callback) throws org.apache.hadoop.hbase.shaded.com.google.protobuf.ServiceException, Throwable
-
getWriteBufferSize
@Deprecated public long getWriteBufferSize()
Deprecated.
-
setWriteBufferSize
@Deprecated public void setWriteBufferSize(long writeBufferSize) throws IOException
Deprecated.- Throws:
IOException
-
batchCoprocessorService
public <R extends org.apache.hadoop.hbase.shaded.com.google.protobuf.Message> Map<byte[],R> batchCoprocessorService(org.apache.hadoop.hbase.shaded.com.google.protobuf.Descriptors.MethodDescriptor methodDescriptor, org.apache.hadoop.hbase.shaded.com.google.protobuf.Message message, byte[] bytes, byte[] bytes2, R r) throws org.apache.hadoop.hbase.shaded.com.google.protobuf.ServiceException, Throwable
-
batchCoprocessorService
public <R extends org.apache.hadoop.hbase.shaded.com.google.protobuf.Message> void batchCoprocessorService(org.apache.hadoop.hbase.shaded.com.google.protobuf.Descriptors.MethodDescriptor methodDescriptor, org.apache.hadoop.hbase.shaded.com.google.protobuf.Message message, byte[] bytes, byte[] bytes2, R r, Batch.Callback<R> rCallback) throws org.apache.hadoop.hbase.shaded.com.google.protobuf.ServiceException, Throwable
-
getBatchExecutor
protected BatchExecutor getBatchExecutor()
Getter for the fieldbatchExecutor
.- Returns:
- a
BatchExecutor
object.
-
setOperationTimeout
public void setOperationTimeout(int i)
- Specified by:
setOperationTimeout
in interfaceTable
-
getOperationTimeout
public int getOperationTimeout()
- Specified by:
getOperationTimeout
in interfaceTable
-
setRpcTimeout
public void setRpcTimeout(int i)
- Specified by:
setRpcTimeout
in interfaceTable
-
getReadRpcTimeout
public int getReadRpcTimeout()
- Specified by:
getReadRpcTimeout
in interfaceTable
-
setReadRpcTimeout
public void setReadRpcTimeout(int i)
- Specified by:
setReadRpcTimeout
in interfaceTable
-
getWriteRpcTimeout
public int getWriteRpcTimeout()
- Specified by:
getWriteRpcTimeout
in interfaceTable
-
setWriteRpcTimeout
public void setWriteRpcTimeout(int i)
- Specified by:
setWriteRpcTimeout
in interfaceTable
-
getRpcTimeout
public int getRpcTimeout()
- Specified by:
getRpcTimeout
in interfaceTable
-
-