Class RegionAsTable
java.lang.Object
org.apache.hadoop.hbase.regionserver.RegionAsTable
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.hbase.client.Table
An implementation of
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classNested classes/interfaces inherited from interface org.apache.hadoop.hbase.client.Table
org.apache.hadoop.hbase.client.Table.CheckAndMutateBuilder, org.apache.hadoop.hbase.client.Table.CheckAndMutateWithFilterBuilder -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.apache.hadoop.hbase.regionserver.Region -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.hbase.client.Resultappend(org.apache.hadoop.hbase.client.Append append) void<R> voidbatchCallback(List<? extends org.apache.hadoop.hbase.client.Row> actions, Object[] results, org.apache.hadoop.hbase.client.coprocessor.Batch.Callback<R> callback) <R extends com.google.protobuf.Message>
Map<byte[],R> batchCoprocessorService(com.google.protobuf.Descriptors.MethodDescriptor methodDescriptor, com.google.protobuf.Message request, byte[] startKey, byte[] endKey, R responsePrototype) <R extends com.google.protobuf.Message>
voidbatchCoprocessorService(com.google.protobuf.Descriptors.MethodDescriptor methodDescriptor, com.google.protobuf.Message request, byte[] startKey, byte[] endKey, R responsePrototype, org.apache.hadoop.hbase.client.coprocessor.Batch.Callback<R> callback) booleancheckAndDelete(byte[] row, byte[] family, byte[] qualifier, byte[] value, org.apache.hadoop.hbase.client.Delete delete) booleancheckAndDelete(byte[] row, byte[] family, byte[] qualifier, org.apache.hadoop.hbase.CompareOperator compareOp, byte[] value, org.apache.hadoop.hbase.client.Delete delete) Deprecated.booleancheckAndDelete(byte[] row, byte[] family, byte[] qualifier, org.apache.hadoop.hbase.filter.CompareFilter.CompareOp compareOp, byte[] value, org.apache.hadoop.hbase.client.Delete delete) Deprecated.org.apache.hadoop.hbase.client.Table.CheckAndMutateBuildercheckAndMutate(byte[] row, byte[] family) booleancheckAndMutate(byte[] row, byte[] family, byte[] qualifier, org.apache.hadoop.hbase.CompareOperator compareOp, byte[] value, org.apache.hadoop.hbase.client.RowMutations mutation) Deprecated.booleancheckAndMutate(byte[] row, byte[] family, byte[] qualifier, org.apache.hadoop.hbase.filter.CompareFilter.CompareOp compareOp, byte[] value, org.apache.hadoop.hbase.client.RowMutations mutation) Deprecated.org.apache.hadoop.hbase.client.Table.CheckAndMutateWithFilterBuildercheckAndMutate(byte[] row, org.apache.hadoop.hbase.filter.Filter filter) booleancheckAndPut(byte[] row, byte[] family, byte[] qualifier, byte[] value, org.apache.hadoop.hbase.client.Put put) Deprecated.booleancheckAndPut(byte[] row, byte[] family, byte[] qualifier, org.apache.hadoop.hbase.CompareOperator compareOp, byte[] value, org.apache.hadoop.hbase.client.Put put) Deprecated.booleancheckAndPut(byte[] row, byte[] family, byte[] qualifier, org.apache.hadoop.hbase.filter.CompareFilter.CompareOp compareOp, byte[] value, org.apache.hadoop.hbase.client.Put put) Deprecated.voidclose()This call will NOT close the underlying region.org.apache.hadoop.hbase.ipc.CoprocessorRpcChannelcoprocessorService(byte[] row) <T extends com.google.protobuf.Service,R>
Map<byte[],R> coprocessorService(Class<T> service, byte[] startKey, byte[] endKey, org.apache.hadoop.hbase.client.coprocessor.Batch.Call<T, R> callable) <T extends com.google.protobuf.Service,R>
voidcoprocessorService(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) voidvoiddelete(org.apache.hadoop.hbase.client.Delete delete) boolean[]booleanexists(org.apache.hadoop.hbase.client.Get get) org.apache.hadoop.hbase.client.Result[]org.apache.hadoop.hbase.client.Resultget(org.apache.hadoop.hbase.client.Get get) org.apache.hadoop.conf.Configurationorg.apache.hadoop.hbase.client.TableDescriptororg.apache.hadoop.hbase.TableNamegetName()intDeprecated.longgetOperationTimeout(TimeUnit unit) intDeprecated.longgetReadRpcTimeout(TimeUnit unit) org.apache.hadoop.hbase.client.RegionLocatorintDeprecated.longgetRpcTimeout(TimeUnit unit) org.apache.hadoop.hbase.client.ResultScannergetScanner(byte[] family) org.apache.hadoop.hbase.client.ResultScannergetScanner(byte[] family, byte[] qualifier) org.apache.hadoop.hbase.client.ResultScannergetScanner(org.apache.hadoop.hbase.client.Scan scan) org.apache.hadoop.hbase.HTableDescriptorDeprecated.intDeprecated.longgetWriteRpcTimeout(TimeUnit unit) org.apache.hadoop.hbase.client.Resultincrement(org.apache.hadoop.hbase.client.Increment increment) longincrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount) longincrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount, org.apache.hadoop.hbase.client.Durability durability) org.apache.hadoop.hbase.client.ResultmutateRow(org.apache.hadoop.hbase.client.RowMutations rm) voidvoidput(org.apache.hadoop.hbase.client.Put put) voidsetOperationTimeout(int operationTimeout) Deprecated.voidsetReadRpcTimeout(int readRpcTimeout) Deprecated.voidsetRpcTimeout(int rpcTimeout) Deprecated.voidsetWriteRpcTimeout(int writeRpcTimeout) Deprecated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.client.Table
checkAndMutate, checkAndMutate, existsAll, getRequestAttributes
-
Field Details
-
region
-
-
Constructor Details
-
RegionAsTable
- Parameters:
region- Region to decorate with Table API.
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceorg.apache.hadoop.hbase.client.Table
-
getConfiguration
- Specified by:
getConfigurationin interfaceorg.apache.hadoop.hbase.client.Table
-
getTableDescriptor
Deprecated.- Specified by:
getTableDescriptorin interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
getDescriptor
- Specified by:
getDescriptorin interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
exists
- Specified by:
existsin interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
exists
- Specified by:
existsin interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
batch
public void batch(List<? extends org.apache.hadoop.hbase.client.Row> actions, Object[] results) throws IOException, InterruptedException - Specified by:
batchin interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOExceptionInterruptedException
-
batchCallback
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 - Specified by:
batchCallbackin interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOExceptionInterruptedException
-
get
public org.apache.hadoop.hbase.client.Result get(org.apache.hadoop.hbase.client.Get get) throws IOException - Specified by:
getin interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
get
public org.apache.hadoop.hbase.client.Result[] get(List<org.apache.hadoop.hbase.client.Get> gets) throws IOException - Specified by:
getin interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
getScanner
public org.apache.hadoop.hbase.client.ResultScanner getScanner(org.apache.hadoop.hbase.client.Scan scan) throws IOException - Specified by:
getScannerin interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
getScanner
- Specified by:
getScannerin interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
getScanner
public org.apache.hadoop.hbase.client.ResultScanner getScanner(byte[] family, byte[] qualifier) throws IOException - Specified by:
getScannerin interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
put
- Specified by:
putin interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
put
- Specified by:
putin interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
checkAndPut
@Deprecated public boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier, byte[] value, org.apache.hadoop.hbase.client.Put put) throws IOException Deprecated.- Specified by:
checkAndPutin interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
checkAndPut
@Deprecated public boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier, org.apache.hadoop.hbase.filter.CompareFilter.CompareOp compareOp, byte[] value, org.apache.hadoop.hbase.client.Put put) throws IOException Deprecated.- Specified by:
checkAndPutin interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
checkAndPut
@Deprecated public boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier, org.apache.hadoop.hbase.CompareOperator compareOp, byte[] value, org.apache.hadoop.hbase.client.Put put) throws IOException Deprecated.- Specified by:
checkAndPutin interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
delete
- Specified by:
deletein interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
delete
- Specified by:
deletein interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
checkAndDelete
public boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier, byte[] value, org.apache.hadoop.hbase.client.Delete delete) throws IOException - Specified by:
checkAndDeletein interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
checkAndDelete
@Deprecated public boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier, org.apache.hadoop.hbase.filter.CompareFilter.CompareOp compareOp, byte[] value, org.apache.hadoop.hbase.client.Delete delete) throws IOException Deprecated.- Specified by:
checkAndDeletein interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
checkAndDelete
@Deprecated public boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier, org.apache.hadoop.hbase.CompareOperator compareOp, byte[] value, org.apache.hadoop.hbase.client.Delete delete) throws IOException Deprecated.- Specified by:
checkAndDeletein interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
checkAndMutate
public org.apache.hadoop.hbase.client.Table.CheckAndMutateBuilder checkAndMutate(byte[] row, byte[] family) - Specified by:
checkAndMutatein interfaceorg.apache.hadoop.hbase.client.Table
-
checkAndMutate
public org.apache.hadoop.hbase.client.Table.CheckAndMutateWithFilterBuilder checkAndMutate(byte[] row, org.apache.hadoop.hbase.filter.Filter filter) - Specified by:
checkAndMutatein interfaceorg.apache.hadoop.hbase.client.Table
-
mutateRow
public org.apache.hadoop.hbase.client.Result mutateRow(org.apache.hadoop.hbase.client.RowMutations rm) throws IOException - Specified by:
mutateRowin interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
append
public org.apache.hadoop.hbase.client.Result append(org.apache.hadoop.hbase.client.Append append) throws IOException - Specified by:
appendin interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
increment
public org.apache.hadoop.hbase.client.Result increment(org.apache.hadoop.hbase.client.Increment increment) throws IOException - Specified by:
incrementin interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
incrementColumnValue
public long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount) throws IOException - Specified by:
incrementColumnValuein interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
incrementColumnValue
public long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount, org.apache.hadoop.hbase.client.Durability durability) throws IOException - Specified by:
incrementColumnValuein interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
close
This call will NOT close the underlying region.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
coprocessorService
- Specified by:
coprocessorServicein interfaceorg.apache.hadoop.hbase.client.Table
-
coprocessorService
public <T extends com.google.protobuf.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 com.google.protobuf.ServiceException, Throwable- Specified by:
coprocessorServicein interfaceorg.apache.hadoop.hbase.client.Table- Throws:
com.google.protobuf.ServiceExceptionThrowable
-
coprocessorService
public <T extends com.google.protobuf.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 com.google.protobuf.ServiceException, Throwable- Specified by:
coprocessorServicein interfaceorg.apache.hadoop.hbase.client.Table- Throws:
com.google.protobuf.ServiceExceptionThrowable
-
batchCoprocessorService
public <R extends com.google.protobuf.Message> Map<byte[],R> batchCoprocessorService(com.google.protobuf.Descriptors.MethodDescriptor methodDescriptor, com.google.protobuf.Message request, byte[] startKey, byte[] endKey, R responsePrototype) throws com.google.protobuf.ServiceException, Throwable - Specified by:
batchCoprocessorServicein interfaceorg.apache.hadoop.hbase.client.Table- Throws:
com.google.protobuf.ServiceExceptionThrowable
-
batchCoprocessorService
public <R extends com.google.protobuf.Message> void batchCoprocessorService(com.google.protobuf.Descriptors.MethodDescriptor methodDescriptor, com.google.protobuf.Message request, byte[] startKey, byte[] endKey, R responsePrototype, org.apache.hadoop.hbase.client.coprocessor.Batch.Callback<R> callback) throws com.google.protobuf.ServiceException, Throwable - Specified by:
batchCoprocessorServicein interfaceorg.apache.hadoop.hbase.client.Table- Throws:
com.google.protobuf.ServiceExceptionThrowable
-
checkAndMutate
@Deprecated public boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier, org.apache.hadoop.hbase.filter.CompareFilter.CompareOp compareOp, byte[] value, org.apache.hadoop.hbase.client.RowMutations mutation) throws IOException Deprecated.- Specified by:
checkAndMutatein interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
checkAndMutate
@Deprecated public boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier, org.apache.hadoop.hbase.CompareOperator compareOp, byte[] value, org.apache.hadoop.hbase.client.RowMutations mutation) throws IOException Deprecated.- Specified by:
checkAndMutatein interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-
setOperationTimeout
Deprecated.- Specified by:
setOperationTimeoutin interfaceorg.apache.hadoop.hbase.client.Table
-
getOperationTimeout
Deprecated.- Specified by:
getOperationTimeoutin interfaceorg.apache.hadoop.hbase.client.Table
-
setRpcTimeout
Deprecated.- Specified by:
setRpcTimeoutin interfaceorg.apache.hadoop.hbase.client.Table
-
getReadRpcTimeout
- Specified by:
getReadRpcTimeoutin interfaceorg.apache.hadoop.hbase.client.Table
-
setWriteRpcTimeout
Deprecated.- Specified by:
setWriteRpcTimeoutin interfaceorg.apache.hadoop.hbase.client.Table
-
getOperationTimeout
- Specified by:
getOperationTimeoutin interfaceorg.apache.hadoop.hbase.client.Table
-
setReadRpcTimeout
Deprecated.- Specified by:
setReadRpcTimeoutin interfaceorg.apache.hadoop.hbase.client.Table
-
getWriteRpcTimeout
- Specified by:
getWriteRpcTimeoutin interfaceorg.apache.hadoop.hbase.client.Table
-
getRpcTimeout
Deprecated.- Specified by:
getRpcTimeoutin interfaceorg.apache.hadoop.hbase.client.Table
-
getRpcTimeout
- Specified by:
getRpcTimeoutin interfaceorg.apache.hadoop.hbase.client.Table
-
getWriteRpcTimeout
Deprecated.- Specified by:
getWriteRpcTimeoutin interfaceorg.apache.hadoop.hbase.client.Table
-
getReadRpcTimeout
Deprecated.- Specified by:
getReadRpcTimeoutin interfaceorg.apache.hadoop.hbase.client.Table
-
getRegionLocator
- Specified by:
getRegionLocatorin interfaceorg.apache.hadoop.hbase.client.Table- Throws:
IOException
-