@Beta
public interface TransactionPruningPlugin
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Called once during the shutdown of the Transaction Service.
|
long |
fetchPruneUpperBound(long time,
long inactiveTransactionBound)
Called periodically to fetch prune upper bound for a data store.
|
void |
initialize(org.apache.hadoop.conf.Configuration conf)
Called once when the Transaction Service starts up.
|
void |
pruneComplete(long time,
long maxPrunedInvalid)
Called after successfully pruning the invalid list using the prune upper bound returned by
fetchPruneUpperBound(long, long) . |
void initialize(org.apache.hadoop.conf.Configuration conf) throws IOException
conf
- configuration for the pluginIOException
long fetchPruneUpperBound(long time, long inactiveTransactionBound) throws IOException
time
- start time of this prune iteration in millisecondsinactiveTransactionBound
- the largest invalid transaction that can be possibly removed
from the invalid list for the given time. This is an upper bound determined
by the Transaction Service, based on its knowledge of in-progress and invalid
transactions that may still have active processes and therefore future writes.
The plugin will typically return a reduced upper bound based on the state of
the invalid transaction data clean up in the data store.IOException
void pruneComplete(long time, long maxPrunedInvalid) throws IOException
fetchPruneUpperBound(long, long)
.
The largest invalid transaction that was removed from the invalid list is passed as a parameter in this call.
The plugin can use this information to clean up its state.time
- start time of this prune iteration in milliseconds (same value as passed to
fetchPruneUpperBound(long, long)
in the same run)maxPrunedInvalid
- the largest invalid transaction that was removed from the invalid listIOException
void destroy()
Copyright © 2018 The Apache Software Foundation. All rights reserved.