|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectco.cask.tephra.hbase94.TransactionAwareHTable
public class TransactionAwareHTable
A Transaction Aware HTable implementation for HBase 0.94.
| Constructor Summary | |
|---|---|
TransactionAwareHTable(org.apache.hadoop.hbase.client.HTable hTable)
Create a transactional aware instance of the passed HTable |
|
TransactionAwareHTable(org.apache.hadoop.hbase.client.HTable hTable,
boolean allowNonTransactional)
Create a transactional aware instance of the passed HTable, with the option of allowing non-transactional operations. |
|
| Method Summary | ||
|---|---|---|
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)
|
|
void |
batch(List<? extends org.apache.hadoop.hbase.client.Row> actions,
Object[] results)
|
|
boolean |
checkAndDelete(byte[] row,
byte[] family,
byte[] qualifier,
byte[] value,
org.apache.hadoop.hbase.client.Delete delete)
|
|
boolean |
checkAndPut(byte[] row,
byte[] family,
byte[] qualifier,
byte[] value,
org.apache.hadoop.hbase.client.Put put)
|
|
void |
close()
|
|
boolean |
commitTx()
|
|
|
coprocessorExec(Class<T> protocol,
byte[] startKey,
byte[] endKey,
org.apache.hadoop.hbase.client.coprocessor.Batch.Call<T,R> callable)
|
|
|
coprocessorExec(Class<T> protocol,
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)
|
|
|
coprocessorProxy(Class<T> protocol,
byte[] row)
|
|
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)
|
|
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)
|
|
boolean |
getAllowNonTransactional()
True if the instance allows non-transaction operations. |
|
org.apache.hadoop.conf.Configuration |
getConfiguration()
|
|
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.HTableDescriptor |
getTableDescriptor()
|
|
byte[] |
getTableName()
|
|
String |
getTransactionAwareName()
|
|
Collection<byte[]> |
getTxChanges()
|
|
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)
|
|
boolean |
isAutoFlush()
|
|
org.apache.hadoop.hbase.client.RowLock |
lockRow(byte[] row)
|
|
void |
mutateRow(org.apache.hadoop.hbase.client.RowMutations rm)
|
|
void |
postTxCommit()
|
|
void |
put(List<org.apache.hadoop.hbase.client.Put> puts)
|
|
void |
put(org.apache.hadoop.hbase.client.Put put)
|
|
boolean |
rollbackTx()
|
|
void |
setAllowNonTransactional(boolean allowNonTransactional)
Set whether the instance allows non-transactional operations. |
|
void |
setAutoFlush(boolean autoFlush)
|
|
void |
setAutoFlush(boolean autoFlush,
boolean clearBufferOnFail)
|
|
void |
setWriteBufferSize(long writeBufferSize)
|
|
void |
startTx(Transaction tx)
|
|
void |
unlockRow(org.apache.hadoop.hbase.client.RowLock rl)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TransactionAwareHTable(org.apache.hadoop.hbase.client.HTable hTable)
hTable -
public TransactionAwareHTable(org.apache.hadoop.hbase.client.HTable hTable,
boolean allowNonTransactional)
hTable - allowNonTransactional - | Method Detail |
|---|
public boolean getAllowNonTransactional()
public void setAllowNonTransactional(boolean allowNonTransactional)
allowNonTransactional - public 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.HTableInterface
public org.apache.hadoop.hbase.HTableDescriptor getTableDescriptor()
throws IOException
getTableDescriptor in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException
public boolean exists(org.apache.hadoop.hbase.client.Get get)
throws IOException
exists in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException
public void batch(List<? extends org.apache.hadoop.hbase.client.Row> actions,
Object[] results)
throws IOException,
InterruptedException
batch in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException
InterruptedException
public Object[] batch(List<? extends org.apache.hadoop.hbase.client.Row> actions)
throws IOException,
InterruptedException
batch in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException
InterruptedException
public org.apache.hadoop.hbase.client.Result get(org.apache.hadoop.hbase.client.Get get)
throws IOException
get in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException
public 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.HTableInterfaceIOException
public org.apache.hadoop.hbase.client.Result getRowOrBefore(byte[] row,
byte[] family)
throws IOException
getRowOrBefore in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException
public org.apache.hadoop.hbase.client.ResultScanner getScanner(org.apache.hadoop.hbase.client.Scan scan)
throws IOException
getScanner in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException
public org.apache.hadoop.hbase.client.ResultScanner getScanner(byte[] family)
throws IOException
getScanner in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException
public org.apache.hadoop.hbase.client.ResultScanner getScanner(byte[] family,
byte[] qualifier)
throws IOException
getScanner in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException
public void put(org.apache.hadoop.hbase.client.Put put)
throws IOException
put in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException
public void put(List<org.apache.hadoop.hbase.client.Put> puts)
throws IOException
put in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException
public 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.HTableInterfaceIOException
public void delete(org.apache.hadoop.hbase.client.Delete delete)
throws IOException
delete in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException
public void delete(List<org.apache.hadoop.hbase.client.Delete> deletes)
throws IOException
delete in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException
public 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.HTableInterfaceIOException
public void mutateRow(org.apache.hadoop.hbase.client.RowMutations rm)
throws IOException
mutateRow in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException
public org.apache.hadoop.hbase.client.Result append(org.apache.hadoop.hbase.client.Append append)
throws IOException
append in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException
public org.apache.hadoop.hbase.client.Result increment(org.apache.hadoop.hbase.client.Increment increment)
throws IOException
increment in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException
public long incrementColumnValue(byte[] row,
byte[] family,
byte[] qualifier,
long amount)
throws IOException
incrementColumnValue in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException
public long incrementColumnValue(byte[] row,
byte[] family,
byte[] qualifier,
long amount,
boolean writeToWAL)
throws IOException
incrementColumnValue in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic boolean isAutoFlush()
isAutoFlush in interface org.apache.hadoop.hbase.client.HTableInterface
public void flushCommits()
throws IOException
flushCommits in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException
public void close()
throws IOException
close in interface Closeableclose in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException
public org.apache.hadoop.hbase.client.RowLock lockRow(byte[] row)
throws IOException
lockRow in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException
public void unlockRow(org.apache.hadoop.hbase.client.RowLock rl)
throws IOException
unlockRow in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException
public <T extends org.apache.hadoop.hbase.ipc.CoprocessorProtocol> T coprocessorProxy(Class<T> protocol,
byte[] row)
coprocessorProxy in interface org.apache.hadoop.hbase.client.HTableInterface
public <T extends org.apache.hadoop.hbase.ipc.CoprocessorProtocol,R> Map<byte[],R> coprocessorExec(Class<T> protocol,
byte[] startKey,
byte[] endKey,
org.apache.hadoop.hbase.client.coprocessor.Batch.Call<T,R> callable)
throws IOException,
Throwable
coprocessorExec in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException
Throwable
public <T extends org.apache.hadoop.hbase.ipc.CoprocessorProtocol,R> void coprocessorExec(Class<T> protocol,
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 IOException,
Throwable
coprocessorExec in interface org.apache.hadoop.hbase.client.HTableInterfaceIOException
Throwablepublic void setAutoFlush(boolean autoFlush)
setAutoFlush in interface org.apache.hadoop.hbase.client.HTableInterface
public 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.HTableInterface
public void setWriteBufferSize(long writeBufferSize)
throws IOException
setWriteBufferSize in interface org.apache.hadoop.hbase.client.HTableInterfaceIOExceptionpublic void startTx(Transaction tx)
startTx in interface TransactionAwarepublic Collection<byte[]> getTxChanges()
getTxChanges in interface TransactionAware
public boolean commitTx()
throws Exception
commitTx in interface TransactionAwareExceptionpublic void postTxCommit()
postTxCommit in interface TransactionAware
public boolean rollbackTx()
throws Exception
rollbackTx in interface TransactionAwareExceptionpublic String getTransactionAwareName()
getTransactionAwareName in interface TransactionAware
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||