Class RemoteHTable
java.lang.Object
org.apache.hadoop.hbase.rest.client.RemoteHTable
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.hadoop.hbase.client.Table
HTable interface to remote tables accessed via REST gateway
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate class
(package private) class
Nested 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
Modifier and TypeFieldDescription(package private) final org.apache.hadoop.hbase.rest.client.Client
(package private) final org.apache.hadoop.conf.Configuration
private static final org.slf4j.Logger
(package private) final int
(package private) final byte[]
private String
(package private) final long
-
Constructor Summary
ConstructorDescriptionRemoteHTable
(org.apache.hadoop.hbase.rest.client.Client client, String name) ConstructorRemoteHTable
(org.apache.hadoop.hbase.rest.client.Client client, org.apache.hadoop.conf.Configuration conf, byte[] name) ConstructorRemoteHTable
(org.apache.hadoop.hbase.rest.client.Client client, org.apache.hadoop.conf.Configuration conf, byte[] name, String pathPrefix) RemoteHTable
(org.apache.hadoop.hbase.rest.client.Client client, org.apache.hadoop.conf.Configuration conf, String name) Constructor -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.hbase.client.Result
append
(org.apache.hadoop.hbase.client.Append append) void
<R> void
batchCallback
(List<? extends org.apache.hadoop.hbase.client.Row> actions, Object[] results, org.apache.hadoop.hbase.client.coprocessor.Batch.Callback<R> callback) <R extends org.apache.hbase.thirdparty.com.google.protobuf.Message>
Map<byte[],R> batchCoprocessorService
(org.apache.hbase.thirdparty.com.google.protobuf.Descriptors.MethodDescriptor method, org.apache.hbase.thirdparty.com.google.protobuf.Message request, byte[] startKey, byte[] endKey, R responsePrototype) <R extends org.apache.hbase.thirdparty.com.google.protobuf.Message>
voidbatchCoprocessorService
(org.apache.hbase.thirdparty.com.google.protobuf.Descriptors.MethodDescriptor method, org.apache.hbase.thirdparty.com.google.protobuf.Message request, byte[] startKey, byte[] endKey, R responsePrototype, org.apache.hadoop.hbase.client.coprocessor.Batch.Callback<R> callback) protected org.apache.hadoop.hbase.rest.model.CellSetModel
buildModelFromPut
(org.apache.hadoop.hbase.client.Put put) protected String
buildMultiRowSpec
(byte[][] rows, int maxVersions) protected org.apache.hadoop.hbase.client.Result[]
buildResultFromModel
(org.apache.hadoop.hbase.rest.model.CellSetModel model) protected String
buildRowSpec
(byte[] row, Map familyMap, long startTime, long endTime, int maxVersions) org.apache.hadoop.hbase.client.Table.CheckAndMutateBuilder
checkAndMutate
(byte[] row, byte[] family) org.apache.hadoop.hbase.client.Table.CheckAndMutateWithFilterBuilder
checkAndMutate
(byte[] row, org.apache.hadoop.hbase.filter.Filter filter) List<org.apache.hadoop.hbase.client.CheckAndMutateResult>
checkAndMutate
(List<org.apache.hadoop.hbase.client.CheckAndMutate> checkAndMutates) org.apache.hadoop.hbase.client.CheckAndMutateResult
checkAndMutate
(org.apache.hadoop.hbase.client.CheckAndMutate checkAndMutate) void
close()
org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel
coprocessorService
(byte[] row) <T extends org.apache.hbase.thirdparty.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 org.apache.hbase.thirdparty.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) void
void
delete
(org.apache.hadoop.hbase.client.Delete delete) private boolean
doCheckAndDelete
(byte[] row, byte[] family, byte[] qualifier, byte[] value, org.apache.hadoop.hbase.client.Delete delete) private boolean
doCheckAndPut
(byte[] row, byte[] family, byte[] qualifier, byte[] value, org.apache.hadoop.hbase.client.Put put) boolean[]
boolean
exists
(org.apache.hadoop.hbase.client.Get get) void
org.apache.hadoop.hbase.client.Result[]
org.apache.hadoop.hbase.client.Result
get
(org.apache.hadoop.hbase.client.Get get) org.apache.hadoop.conf.Configuration
org.apache.hadoop.hbase.client.TableDescriptor
org.apache.hadoop.hbase.TableName
getName()
long
getOperationTimeout
(TimeUnit unit) long
getReadRpcTimeout
(TimeUnit unit) org.apache.hadoop.hbase.client.RegionLocator
private org.apache.hadoop.hbase.client.Result[]
getResults
(String spec) long
getRpcTimeout
(TimeUnit unit) org.apache.hadoop.hbase.client.ResultScanner
getScanner
(byte[] family) org.apache.hadoop.hbase.client.ResultScanner
getScanner
(byte[] family, byte[] qualifier) org.apache.hadoop.hbase.client.ResultScanner
getScanner
(org.apache.hadoop.hbase.client.Scan scan) byte[]
long
getWriteRpcTimeout
(TimeUnit unit) org.apache.hadoop.hbase.client.Result
increment
(org.apache.hadoop.hbase.client.Increment increment) long
incrementColumnValue
(byte[] row, byte[] family, byte[] qualifier, long amount) long
incrementColumnValue
(byte[] row, byte[] family, byte[] qualifier, long amount, org.apache.hadoop.hbase.client.Durability durability) boolean
org.apache.hadoop.hbase.client.Result
mutateRow
(org.apache.hadoop.hbase.client.RowMutations rm) void
void
put
(org.apache.hadoop.hbase.client.Put put) private static String
toURLEncodedBytes
(byte[] row) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.client.Table
getRequestAttributes
-
Field Details
-
LOG
-
client
-
conf
-
name
-
maxRetries
-
sleepTime
-
pathPrefix
-
-
Constructor Details
-
RemoteHTable
Constructor -
RemoteHTable
public RemoteHTable(org.apache.hadoop.hbase.rest.client.Client client, org.apache.hadoop.conf.Configuration conf, String name) Constructor -
RemoteHTable
public RemoteHTable(org.apache.hadoop.hbase.rest.client.Client client, org.apache.hadoop.conf.Configuration conf, byte[] name) Constructor -
RemoteHTable
public RemoteHTable(org.apache.hadoop.hbase.rest.client.Client client, org.apache.hadoop.conf.Configuration conf, byte[] name, String pathPrefix)
-
-
Method Details
-
buildRowSpec
protected String buildRowSpec(byte[] row, Map familyMap, long startTime, long endTime, int maxVersions) -
buildMultiRowSpec
-
buildResultFromModel
protected org.apache.hadoop.hbase.client.Result[] buildResultFromModel(org.apache.hadoop.hbase.rest.model.CellSetModel model) -
buildModelFromPut
protected org.apache.hadoop.hbase.rest.model.CellSetModel buildModelFromPut(org.apache.hadoop.hbase.client.Put put) -
getTableName
-
getName
- Specified by:
getName
in interfaceorg.apache.hadoop.hbase.client.Table
-
getConfiguration
- Specified by:
getConfiguration
in interfaceorg.apache.hadoop.hbase.client.Table
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceorg.apache.hadoop.hbase.client.Table
- Throws:
IOException
-
get
public org.apache.hadoop.hbase.client.Result get(org.apache.hadoop.hbase.client.Get get) throws IOException - Specified by:
get
in 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:
get
in interfaceorg.apache.hadoop.hbase.client.Table
- Throws:
IOException
-
getResults
- Throws:
IOException
-
exists
- Specified by:
exists
in interfaceorg.apache.hadoop.hbase.client.Table
- Throws:
IOException
-
exists
- Specified by:
exists
in interfaceorg.apache.hadoop.hbase.client.Table
- Throws:
IOException
-
put
- Specified by:
put
in interfaceorg.apache.hadoop.hbase.client.Table
- Throws:
IOException
-
put
- Specified by:
put
in interfaceorg.apache.hadoop.hbase.client.Table
- Throws:
IOException
-
delete
- Specified by:
delete
in interfaceorg.apache.hadoop.hbase.client.Table
- Throws:
IOException
-
delete
- Specified by:
delete
in interfaceorg.apache.hadoop.hbase.client.Table
- Throws:
IOException
-
flushCommits
- Throws:
IOException
-
getDescriptor
- Specified by:
getDescriptor
in 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:
getScanner
in interfaceorg.apache.hadoop.hbase.client.Table
- Throws:
IOException
-
getScanner
- Specified by:
getScanner
in 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:
getScanner
in interfaceorg.apache.hadoop.hbase.client.Table
- Throws:
IOException
-
isAutoFlush
-
doCheckAndPut
private boolean doCheckAndPut(byte[] row, byte[] family, byte[] qualifier, byte[] value, org.apache.hadoop.hbase.client.Put put) throws IOException - Throws:
IOException
-
doCheckAndDelete
private boolean doCheckAndDelete(byte[] row, byte[] family, byte[] qualifier, byte[] value, org.apache.hadoop.hbase.client.Delete delete) throws IOException - Throws:
IOException
-
checkAndMutate
public org.apache.hadoop.hbase.client.Table.CheckAndMutateBuilder checkAndMutate(byte[] row, byte[] family) - Specified by:
checkAndMutate
in 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:
checkAndMutate
in interfaceorg.apache.hadoop.hbase.client.Table
-
checkAndMutate
public org.apache.hadoop.hbase.client.CheckAndMutateResult checkAndMutate(org.apache.hadoop.hbase.client.CheckAndMutate checkAndMutate) - Specified by:
checkAndMutate
in interfaceorg.apache.hadoop.hbase.client.Table
-
checkAndMutate
public List<org.apache.hadoop.hbase.client.CheckAndMutateResult> checkAndMutate(List<org.apache.hadoop.hbase.client.CheckAndMutate> checkAndMutates) - Specified by:
checkAndMutate
in interfaceorg.apache.hadoop.hbase.client.Table
-
increment
public org.apache.hadoop.hbase.client.Result increment(org.apache.hadoop.hbase.client.Increment increment) throws IOException - Specified by:
increment
in 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:
append
in interfaceorg.apache.hadoop.hbase.client.Table
- Throws:
IOException
-
incrementColumnValue
public long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount) throws IOException - Specified by:
incrementColumnValue
in 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:
incrementColumnValue
in 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 - Specified by:
batch
in interfaceorg.apache.hadoop.hbase.client.Table
- Throws:
IOException
-
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:
batchCallback
in interfaceorg.apache.hadoop.hbase.client.Table
- Throws:
IOException
InterruptedException
-
coprocessorService
- Specified by:
coprocessorService
in interfaceorg.apache.hadoop.hbase.client.Table
-
coprocessorService
public <T extends org.apache.hbase.thirdparty.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 org.apache.hbase.thirdparty.com.google.protobuf.ServiceException, Throwable- Specified by:
coprocessorService
in interfaceorg.apache.hadoop.hbase.client.Table
- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
Throwable
-
coprocessorService
public <T extends org.apache.hbase.thirdparty.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 org.apache.hbase.thirdparty.com.google.protobuf.ServiceException, Throwable- Specified by:
coprocessorService
in interfaceorg.apache.hadoop.hbase.client.Table
- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
Throwable
-
mutateRow
public org.apache.hadoop.hbase.client.Result mutateRow(org.apache.hadoop.hbase.client.RowMutations rm) throws IOException - Specified by:
mutateRow
in interfaceorg.apache.hadoop.hbase.client.Table
- Throws:
IOException
-
batchCoprocessorService
public <R extends org.apache.hbase.thirdparty.com.google.protobuf.Message> Map<byte[],R> batchCoprocessorService(org.apache.hbase.thirdparty.com.google.protobuf.Descriptors.MethodDescriptor method, org.apache.hbase.thirdparty.com.google.protobuf.Message request, byte[] startKey, byte[] endKey, R responsePrototype) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException, Throwable - Specified by:
batchCoprocessorService
in interfaceorg.apache.hadoop.hbase.client.Table
- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
Throwable
-
batchCoprocessorService
public <R extends org.apache.hbase.thirdparty.com.google.protobuf.Message> void batchCoprocessorService(org.apache.hbase.thirdparty.com.google.protobuf.Descriptors.MethodDescriptor method, org.apache.hbase.thirdparty.com.google.protobuf.Message request, byte[] startKey, byte[] endKey, R responsePrototype, org.apache.hadoop.hbase.client.coprocessor.Batch.Callback<R> callback) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException, Throwable - Specified by:
batchCoprocessorService
in interfaceorg.apache.hadoop.hbase.client.Table
- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
Throwable
-
getReadRpcTimeout
- Specified by:
getReadRpcTimeout
in interfaceorg.apache.hadoop.hbase.client.Table
-
getRpcTimeout
- Specified by:
getRpcTimeout
in interfaceorg.apache.hadoop.hbase.client.Table
-
getWriteRpcTimeout
- Specified by:
getWriteRpcTimeout
in interfaceorg.apache.hadoop.hbase.client.Table
-
getOperationTimeout
- Specified by:
getOperationTimeout
in interfaceorg.apache.hadoop.hbase.client.Table
-
toURLEncodedBytes
-
getRegionLocator
- Specified by:
getRegionLocator
in interfaceorg.apache.hadoop.hbase.client.Table
- Throws:
IOException
-