public class ValidCompactorTxnList
extends org.apache.hadoop.hive.common.ValidReadTxnList
ValidTxnList for use by the compactor.
For the purposes of isTxnRangeValid(long, long) this class will view a transaction as valid if it
is committed or aborted. Additionally it will return none if there are any open transactions
below the max transaction given, since we don't want to compact above open transactions. For
ValidReadTxnList.isTxnValid(long) it will still view a transaction as valid only if it is committed. 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.| Constructor and Description |
|---|
ValidCompactorTxnList() |
ValidCompactorTxnList(long[] exceptions,
long minOpen,
long highWatermark) |
ValidCompactorTxnList(String value) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.hive.common.ValidTxnList.RangeResponse |
isTxnRangeValid(long minTxnId,
long maxTxnId) |
void |
readFromString(String src) |
String |
writeToString() |
public ValidCompactorTxnList()
public ValidCompactorTxnList(long[] exceptions,
long minOpen,
long highWatermark)
exceptions - list of all open and aborted transactionsminOpen - lowest open transactionhighWatermark - highest committed transactionpublic ValidCompactorTxnList(String value)
public org.apache.hadoop.hive.common.ValidTxnList.RangeResponse isTxnRangeValid(long minTxnId,
long maxTxnId)
isTxnRangeValid in interface org.apache.hadoop.hive.common.ValidTxnListisTxnRangeValid in class org.apache.hadoop.hive.common.ValidReadTxnListpublic String writeToString()
writeToString in interface org.apache.hadoop.hive.common.ValidTxnListwriteToString in class org.apache.hadoop.hive.common.ValidReadTxnListpublic void readFromString(String src)
readFromString in interface org.apache.hadoop.hive.common.ValidTxnListreadFromString in class org.apache.hadoop.hive.common.ValidReadTxnListCopyright © 2016 Cloudera. All rights reserved.