public class HBaseTransactionPruningPlugin extends Object implements TransactionPruningPlugin
TransactionPruningPlugin for HBase.
This plugin determines the prune upper bound for transactional HBase tables that use
coprocessor TransactionProcessor.
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.hadoop.conf.Configuration |
conf |
protected org.apache.hadoop.hbase.client.Connection |
connection |
protected DataJanitorState |
dataJanitorState |
static org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
HBaseTransactionPruningPlugin() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createPruneTable(org.apache.hadoop.hbase.TableName stateTable)
Create the prune state table given the
TableName if the table doesn't exist already. |
void |
destroy() |
long |
fetchPruneUpperBound(long time,
long inactiveTransactionBound)
Determines prune upper bound for the data store as mentioned above.
|
protected SortedSet<byte[]> |
getTransactionalRegions() |
void |
initialize(org.apache.hadoop.conf.Configuration conf) |
protected boolean |
isTransactionalTable(org.apache.hadoop.hbase.HTableDescriptor tableDescriptor)
Returns whether the table is a transactional table.
|
void |
pruneComplete(long time,
long maxPrunedInvalid)
After invalid list has been pruned, this cleans up state information that is no longer required.
|
public static final org.slf4j.Logger LOG
protected org.apache.hadoop.conf.Configuration conf
protected org.apache.hadoop.hbase.client.Connection connection
protected DataJanitorState dataJanitorState
public void initialize(org.apache.hadoop.conf.Configuration conf)
throws IOException
initialize in interface TransactionPruningPluginIOExceptionpublic long fetchPruneUpperBound(long time,
long inactiveTransactionBound)
throws IOException
fetchPruneUpperBound in interface TransactionPruningPluginIOExceptionpublic void pruneComplete(long time,
long maxPrunedInvalid)
throws IOException
pruneComplete in interface TransactionPruningPluginIOExceptionpublic void destroy()
destroy in interface TransactionPruningPluginprotected void createPruneTable(org.apache.hadoop.hbase.TableName stateTable)
throws IOException
TableName if the table doesn't exist already.stateTable - prune state table nameIOExceptionprotected boolean isTransactionalTable(org.apache.hadoop.hbase.HTableDescriptor tableDescriptor)
TransactionProcessor attached to it. Should be overriden if the users
attach a different coprocessor.tableDescriptor - HTableDescriptor of the tableprotected SortedSet<byte[]> getTransactionalRegions() throws IOException
IOExceptionCopyright © 2017 The Apache Software Foundation. All rights reserved.