public class ValidCompactorTxnList extends ValidReadTxnList
ValidTxnListfor use by the compactor. Compaction should only include txns up to smallest open txn (exclussive). There may be aborted txns in the snapshot represented by this ValidCompactorTxnList. Thus
isTxnRangeValid(long, long)returns NONE for any range that inluces any unresolved transactions. Any txn above
highWatermarkis unresolved. These produce the logic we need to assure that the compactor only sees records less than the lowest open transaction when choosing which files to compact, but that it still ignores aborted records when compacting. See
org.apache.hadoop.hive.metastore.txn.TxnUtils#createValidCompactTxnList()for proper way to construct this.
|Constructor and Description|
|Modifier and Type||Method and Description|
getHighWatermark, getInvalidTransactions, getMinOpenTxn, isTxnValid, isValidBase, readFromString, toString, writeToString
public ValidCompactorTxnList(long abortedTxnList, long highWatermark)
abortedTxnList- list of all aborted transactions
highWatermark- highest committed transaction to be considered for compaction, equivalently (lowest_open_txn - 1).
public ValidCompactorTxnList(String value)
public ValidTxnList.RangeResponse isTxnRangeValid(long minTxnId, long maxTxnId)
org.apache.hadoop.hive.common.ValidTxnList.RangeResponse.ALLif all txns in the range are resolved and RangeResponse.NONE otherwise
Copyright © 2016 The Apache Software Foundation. All rights reserved.