public class HBaseTableConnection extends Object implements org.apache.hadoop.hbase.client.HTableInterface
| Constructor and Description |
|---|
HBaseTableConnection(org.apache.hadoop.conf.Configuration conf,
String tableName,
boolean autoflush)
Instantiate new connection.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.hbase.client.Result |
append(org.apache.hadoop.hbase.client.Append append) |
Object[] |
batch(List<? extends org.apache.hadoop.hbase.client.Row> actions)
Deprecated.
|
void |
batch(List<? extends org.apache.hadoop.hbase.client.Row> actions,
Object[] results) |
<R> Object[] |
batchCallback(List<? extends org.apache.hadoop.hbase.client.Row> actions,
org.apache.hadoop.hbase.client.coprocessor.Batch.Callback<R> callback)
Deprecated.
|
<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 com.google.protobuf.Message> |
batchCoprocessorService(com.google.protobuf.Descriptors.MethodDescriptor methodDescriptor,
com.google.protobuf.Message request,
byte[] startKey,
byte[] endKey,
R responsePrototype) |
<R extends com.google.protobuf.Message> |
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) |
boolean |
checkAndDelete(byte[] row,
byte[] family,
byte[] qualifier,
byte[] value,
org.apache.hadoop.hbase.client.Delete delete) |
boolean |
checkAndMutate(byte[] arg0,
byte[] arg1,
byte[] arg2,
org.apache.hadoop.hbase.filter.CompareFilter.CompareOp arg3,
byte[] arg4,
org.apache.hadoop.hbase.client.RowMutations arg5) |
boolean |
checkAndPut(byte[] row,
byte[] family,
byte[] qualifier,
byte[] value,
org.apache.hadoop.hbase.client.Put put) |
void |
close() |
org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel |
coprocessorService(byte[] row) |
<T extends com.google.protobuf.Service,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> |
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(org.apache.hadoop.hbase.client.Delete delete) |
void |
delete(List<org.apache.hadoop.hbase.client.Delete> deletes) |
boolean |
exists(org.apache.hadoop.hbase.client.Get get) |
Boolean[] |
exists(List<org.apache.hadoop.hbase.client.Get> gets) |
void |
flushCommits() |
org.apache.hadoop.hbase.client.Result |
get(org.apache.hadoop.hbase.client.Get get) |
org.apache.hadoop.hbase.client.Result[] |
get(List<org.apache.hadoop.hbase.client.Get> gets) |
org.apache.hadoop.conf.Configuration |
getConfiguration() |
org.apache.hadoop.hbase.TableName |
getName() |
org.apache.hadoop.hbase.HRegionLocation |
getRegionLocation(byte[] bs)
getRegionLocation provided by
HTable but not
HTableInterface. |
org.apache.hadoop.hbase.client.Result |
getRowOrBefore(byte[] row,
byte[] family) |
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) |
org.apache.hadoop.hbase.util.Pair<byte[][],byte[][]> |
getStartEndKeys()
getStartEndKeys provided by
HTable but not HTableInterface. |
org.apache.hadoop.hbase.HTableDescriptor |
getTableDescriptor() |
byte[] |
getTableName() |
long |
getWriteBufferSize() |
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,
boolean writeToWAL)
Deprecated.
|
long |
incrementColumnValue(byte[] row,
byte[] family,
byte[] qualifier,
long amount,
org.apache.hadoop.hbase.client.Durability durability) |
boolean |
isAutoFlush() |
void |
mutateRow(org.apache.hadoop.hbase.client.RowMutations rm) |
void |
put(List<org.apache.hadoop.hbase.client.Put> puts) |
void |
put(org.apache.hadoop.hbase.client.Put put) |
void |
setAutoFlush(boolean autoFlush) |
void |
setAutoFlush(boolean autoFlush,
boolean clearBufferOnFail) |
void |
setAutoFlushTo(boolean autoFlush) |
void |
setWriteBufferSize(long writeBufferSize) |
public HBaseTableConnection(org.apache.hadoop.conf.Configuration conf,
String tableName,
boolean autoflush)
throws IOException
conf - tableName - autoflush - IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic byte[] getTableName()
getTableName in interface org.apache.hadoop.hbase.client.HTableInterfacepublic org.apache.hadoop.conf.Configuration getConfiguration()
getConfiguration in interface org.apache.hadoop.hbase.client.HTableInterfacepublic boolean isAutoFlush()
isAutoFlush in interface org.apache.hadoop.hbase.client.HTableInterfacepublic org.apache.hadoop.hbase.util.Pair<byte[][],byte[][]> getStartEndKeys()
throws IOException
HTable but not HTableInterface.IOExceptionHTable.getStartEndKeys()public org.apache.hadoop.hbase.HRegionLocation getRegionLocation(byte[] bs)
throws IOException
HTable but not
HTableInterface.IOExceptionHTable.getRegionLocation(byte[])public org.apache.hadoop.hbase.HTableDescriptor getTableDescriptor()
throws IOException
getTableDescriptor in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic boolean exists(org.apache.hadoop.hbase.client.Get get)
throws IOException
exists in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic org.apache.hadoop.hbase.client.Result get(org.apache.hadoop.hbase.client.Get get)
throws IOException
get in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic org.apache.hadoop.hbase.client.Result[] get(List<org.apache.hadoop.hbase.client.Get> gets) throws IOException
get in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic org.apache.hadoop.hbase.client.Result getRowOrBefore(byte[] row,
byte[] family)
throws IOException
getRowOrBefore in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic org.apache.hadoop.hbase.client.ResultScanner getScanner(org.apache.hadoop.hbase.client.Scan scan)
throws IOException
getScanner in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic org.apache.hadoop.hbase.client.ResultScanner getScanner(byte[] family)
throws IOException
getScanner in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic org.apache.hadoop.hbase.client.ResultScanner getScanner(byte[] family,
byte[] qualifier)
throws IOException
getScanner in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic void put(org.apache.hadoop.hbase.client.Put put)
throws IOException
put in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic void put(List<org.apache.hadoop.hbase.client.Put> puts) throws IOException
put in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic boolean checkAndPut(byte[] row,
byte[] family,
byte[] qualifier,
byte[] value,
org.apache.hadoop.hbase.client.Put put)
throws IOException
checkAndPut in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic void delete(org.apache.hadoop.hbase.client.Delete delete)
throws IOException
delete in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic void delete(List<org.apache.hadoop.hbase.client.Delete> deletes) throws IOException
delete in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic boolean checkAndDelete(byte[] row,
byte[] family,
byte[] qualifier,
byte[] value,
org.apache.hadoop.hbase.client.Delete delete)
throws IOException
checkAndDelete in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic org.apache.hadoop.hbase.client.Result increment(org.apache.hadoop.hbase.client.Increment increment)
throws IOException
increment in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic long incrementColumnValue(byte[] row,
byte[] family,
byte[] qualifier,
long amount)
throws IOException
incrementColumnValue in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException@Deprecated public long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount, boolean writeToWAL) throws IOException
incrementColumnValue in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic void flushCommits()
throws IOException
flushCommits in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic void batch(List<? extends org.apache.hadoop.hbase.client.Row> actions, Object[] results) throws IOException, InterruptedException
batch in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionInterruptedExceptionpublic void mutateRow(org.apache.hadoop.hbase.client.RowMutations rm)
throws IOException
mutateRow in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic org.apache.hadoop.hbase.client.Result append(org.apache.hadoop.hbase.client.Append append)
throws IOException
append in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic void setAutoFlush(boolean autoFlush)
setAutoFlush in interface org.apache.hadoop.hbase.client.HTableInterfacepublic void setAutoFlush(boolean autoFlush,
boolean clearBufferOnFail)
setAutoFlush in interface org.apache.hadoop.hbase.client.HTableInterfacepublic long getWriteBufferSize()
getWriteBufferSize in interface org.apache.hadoop.hbase.client.HTableInterfacepublic void setWriteBufferSize(long writeBufferSize)
throws IOException
setWriteBufferSize in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic org.apache.hadoop.hbase.TableName getName()
getName in interface org.apache.hadoop.hbase.client.HTableInterfacepublic Boolean[] exists(List<org.apache.hadoop.hbase.client.Get> gets) throws IOException
exists in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic <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
batchCallback in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionInterruptedException@Deprecated public <R> Object[] batchCallback(List<? extends org.apache.hadoop.hbase.client.Row> actions, org.apache.hadoop.hbase.client.coprocessor.Batch.Callback<R> callback) throws IOException, InterruptedException
batchCallback in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionInterruptedExceptionpublic long incrementColumnValue(byte[] row,
byte[] family,
byte[] qualifier,
long amount,
org.apache.hadoop.hbase.client.Durability durability)
throws IOException
incrementColumnValue in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel coprocessorService(byte[] row)
coprocessorService in interface org.apache.hadoop.hbase.client.HTableInterfacepublic <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
coprocessorService in interface org.apache.hadoop.hbase.client.HTableInterfacecom.google.protobuf.ServiceExceptionThrowablepublic <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
coprocessorService in interface org.apache.hadoop.hbase.client.HTableInterfacecom.google.protobuf.ServiceExceptionThrowablepublic void setAutoFlushTo(boolean autoFlush)
setAutoFlushTo in interface org.apache.hadoop.hbase.client.HTableInterfacepublic <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
batchCoprocessorService in interface org.apache.hadoop.hbase.client.HTableInterfacecom.google.protobuf.ServiceExceptionThrowablepublic <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
batchCoprocessorService in interface org.apache.hadoop.hbase.client.HTableInterfacecom.google.protobuf.ServiceExceptionThrowable@Deprecated public Object[] batch(List<? extends org.apache.hadoop.hbase.client.Row> actions) throws IOException, InterruptedException
batch in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionInterruptedExceptionpublic boolean checkAndMutate(byte[] arg0,
byte[] arg1,
byte[] arg2,
org.apache.hadoop.hbase.filter.CompareFilter.CompareOp arg3,
byte[] arg4,
org.apache.hadoop.hbase.client.RowMutations arg5)
throws IOException
checkAndMutate in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionCopyright © 2010-2015 The Apache Software Foundation. All Rights Reserved.