public class RegionAsTable extends Object implements Table
Table that sits directly on a Region; it decorates the passed in
Region instance with the Table API. Some API is not implemented yet (throws
UnsupportedOperationException) mostly because no need as yet or it necessitates copying
a load of code local from RegionServer.
Use as an instance of a Table in-the-small -- no networking or servers
necessary -- or to write a test that can run directly against the datastore and then
over the network.
Table.CheckAndMutateBuilder| Constructor and Description |
|---|
RegionAsTable(Region region) |
| Modifier and Type | Method and Description |
|---|---|
Result |
append(Append append) |
void |
batch(List<? extends Row> actions,
Object[] results) |
<R> void |
batchCallback(List<? extends Row> actions,
Object[] results,
org.apache.hadoop.hbase.client.coprocessor.Batch.Callback<R> callback) |
<R extends Message> |
batchCoprocessorService(Descriptors.MethodDescriptor methodDescriptor,
Message request,
byte[] startKey,
byte[] endKey,
R responsePrototype) |
<R extends Message> |
batchCoprocessorService(Descriptors.MethodDescriptor methodDescriptor,
Message request,
byte[] startKey,
byte[] endKey,
R responsePrototype,
org.apache.hadoop.hbase.client.coprocessor.Batch.Callback<R> callback) |
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)
Deprecated.
|
boolean |
checkAndDelete(byte[] row,
byte[] family,
byte[] qualifier,
CompareOperator compareOp,
byte[] value,
Delete delete)
Deprecated.
|
Table.CheckAndMutateBuilder |
checkAndMutate(byte[] row,
byte[] family) |
boolean |
checkAndMutate(byte[] row,
byte[] family,
byte[] qualifier,
CompareFilter.CompareOp compareOp,
byte[] value,
RowMutations mutation)
Deprecated.
|
boolean |
checkAndMutate(byte[] row,
byte[] family,
byte[] qualifier,
CompareOperator compareOp,
byte[] value,
RowMutations mutation)
Deprecated.
|
boolean |
checkAndPut(byte[] row,
byte[] family,
byte[] qualifier,
byte[] value,
Put put)
Deprecated.
|
boolean |
checkAndPut(byte[] row,
byte[] family,
byte[] qualifier,
CompareFilter.CompareOp compareOp,
byte[] value,
Put put)
Deprecated.
|
boolean |
checkAndPut(byte[] row,
byte[] family,
byte[] qualifier,
CompareOperator compareOp,
byte[] value,
Put put)
Deprecated.
|
void |
close()
This call will NOT close the underlying region.
|
CoprocessorRpcChannel |
coprocessorService(byte[] row) |
<T extends Service,R> |
coprocessorService(Class<T> service,
byte[] startKey,
byte[] endKey,
org.apache.hadoop.hbase.client.coprocessor.Batch.Call<T,R> callable) |
<T extends Service,R> |
coprocessorService(Class<T> service,
byte[] startKey,
byte[] endKey,
org.apache.hadoop.hbase.client.coprocessor.Batch.Call<T,R> callable,
org.apache.hadoop.hbase.client.coprocessor.Batch.Callback<R> callback) |
void |
delete(Delete delete) |
void |
delete(List<Delete> deletes) |
boolean |
exists(Get get) |
boolean[] |
exists(List<Get> gets) |
Result |
get(Get get) |
Result[] |
get(List<Get> gets) |
org.apache.hadoop.conf.Configuration |
getConfiguration() |
TableDescriptor |
getDescriptor() |
TableName |
getName() |
int |
getOperationTimeout()
Deprecated.
|
long |
getOperationTimeout(TimeUnit unit) |
int |
getReadRpcTimeout()
Deprecated.
|
long |
getReadRpcTimeout(TimeUnit unit) |
int |
getRpcTimeout()
Deprecated.
|
long |
getRpcTimeout(TimeUnit unit) |
ResultScanner |
getScanner(byte[] family) |
ResultScanner |
getScanner(byte[] family,
byte[] qualifier) |
ResultScanner |
getScanner(Scan scan) |
HTableDescriptor |
getTableDescriptor()
Deprecated.
|
int |
getWriteRpcTimeout()
Deprecated.
|
long |
getWriteRpcTimeout(TimeUnit unit) |
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 operationTimeout)
Deprecated.
|
void |
setReadRpcTimeout(int readRpcTimeout)
Deprecated.
|
void |
setRpcTimeout(int rpcTimeout)
Deprecated.
|
void |
setWriteRpcTimeout(int writeRpcTimeout)
Deprecated.
|
public RegionAsTable(Region region)
region - Region to decorate with Table API.public org.apache.hadoop.conf.Configuration getConfiguration()
getConfiguration in interface Table@Deprecated public HTableDescriptor getTableDescriptor() throws IOException
getTableDescriptor in interface TableIOExceptionpublic TableDescriptor getDescriptor() throws IOException
getDescriptor in interface TableIOExceptionpublic boolean exists(Get get) throws IOException
exists in interface TableIOExceptionpublic boolean[] exists(List<Get> gets) throws IOException
exists in interface TableIOExceptionpublic void batch(List<? extends Row> actions, Object[] results) throws IOException, InterruptedException
batch in interface TableIOExceptionInterruptedExceptionpublic <R> void batchCallback(List<? extends Row> actions, Object[] results, org.apache.hadoop.hbase.client.coprocessor.Batch.Callback<R> callback) throws IOException, InterruptedException
batchCallback in interface TableIOExceptionInterruptedExceptionpublic Result get(Get get) throws IOException
get in interface TableIOExceptionpublic Result[] get(List<Get> gets) throws IOException
get in interface TableIOExceptionpublic ResultScanner getScanner(Scan scan) throws IOException
getScanner in interface TableIOExceptionpublic ResultScanner getScanner(byte[] family) throws IOException
getScanner in interface TableIOExceptionpublic ResultScanner getScanner(byte[] family, byte[] qualifier) throws IOException
getScanner in interface TableIOExceptionpublic void put(Put put) throws IOException
put in interface TableIOExceptionpublic void put(List<Put> puts) throws IOException
put in interface TableIOException@Deprecated public boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier, byte[] value, Put put) throws IOException
checkAndPut in interface TableIOException@Deprecated public boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, byte[] value, Put put) throws IOException
checkAndPut in interface TableIOException@Deprecated public boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier, CompareOperator compareOp, byte[] value, Put put) throws IOException
checkAndPut in interface TableIOExceptionpublic void delete(Delete delete) throws IOException
delete in interface TableIOExceptionpublic void delete(List<Delete> deletes) throws IOException
delete in interface TableIOExceptionpublic boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier, byte[] value, Delete delete) throws IOException
checkAndDelete in interface TableIOException@Deprecated public boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, byte[] value, Delete delete) throws IOException
checkAndDelete in interface TableIOException@Deprecated public boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier, CompareOperator compareOp, byte[] value, Delete delete) throws IOException
checkAndDelete in interface TableIOExceptionpublic Table.CheckAndMutateBuilder checkAndMutate(byte[] row, byte[] family)
checkAndMutate in interface Tablepublic void mutateRow(RowMutations rm) throws IOException
mutateRow in interface TableIOExceptionpublic Result append(Append append) throws IOException
append in interface TableIOExceptionpublic Result increment(Increment increment) throws IOException
increment in interface TableIOExceptionpublic long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount) throws IOException
incrementColumnValue in interface TableIOExceptionpublic long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount, Durability durability) throws IOException
incrementColumnValue in interface TableIOExceptionpublic void close() throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface TableIOExceptionpublic CoprocessorRpcChannel coprocessorService(byte[] row)
coprocessorService in interface Tablepublic <T extends Service,R> Map<byte[],R> coprocessorService(Class<T> service, byte[] startKey, byte[] endKey, org.apache.hadoop.hbase.client.coprocessor.Batch.Call<T,R> callable) throws ServiceException, Throwable
coprocessorService in interface TableServiceExceptionThrowablepublic <T extends Service,R> void coprocessorService(Class<T> service, byte[] startKey, byte[] endKey, org.apache.hadoop.hbase.client.coprocessor.Batch.Call<T,R> callable, org.apache.hadoop.hbase.client.coprocessor.Batch.Callback<R> callback) throws ServiceException, Throwable
coprocessorService in interface TableServiceExceptionThrowablepublic <R extends Message> Map<byte[],R> batchCoprocessorService(Descriptors.MethodDescriptor methodDescriptor, Message request, byte[] startKey, byte[] endKey, R responsePrototype) throws ServiceException, Throwable
batchCoprocessorService in interface TableServiceExceptionThrowablepublic <R extends Message> void batchCoprocessorService(Descriptors.MethodDescriptor methodDescriptor, Message request, byte[] startKey, byte[] endKey, R responsePrototype, org.apache.hadoop.hbase.client.coprocessor.Batch.Callback<R> callback) throws ServiceException, Throwable
batchCoprocessorService in interface TableServiceExceptionThrowable@Deprecated public boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, byte[] value, RowMutations mutation) throws IOException
checkAndMutate in interface TableIOException@Deprecated public boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier, CompareOperator compareOp, byte[] value, RowMutations mutation) throws IOException
checkAndMutate in interface TableIOException@Deprecated public void setOperationTimeout(int operationTimeout)
setOperationTimeout in interface Table@Deprecated public int getOperationTimeout()
getOperationTimeout in interface Table@Deprecated public void setRpcTimeout(int rpcTimeout)
setRpcTimeout in interface Tablepublic long getReadRpcTimeout(TimeUnit unit)
getReadRpcTimeout in interface Table@Deprecated public void setWriteRpcTimeout(int writeRpcTimeout)
setWriteRpcTimeout in interface Tablepublic long getOperationTimeout(TimeUnit unit)
getOperationTimeout in interface Table@Deprecated public void setReadRpcTimeout(int readRpcTimeout)
setReadRpcTimeout in interface Tablepublic long getWriteRpcTimeout(TimeUnit unit)
getWriteRpcTimeout in interface Table@Deprecated public int getRpcTimeout()
getRpcTimeout in interface Tablepublic long getRpcTimeout(TimeUnit unit)
getRpcTimeout in interface Table@Deprecated public int getWriteRpcTimeout()
getWriteRpcTimeout in interface Table@Deprecated public int getReadRpcTimeout()
getReadRpcTimeout in interface TableCopyright © 2007–2019 Cloudera. All rights reserved.