public class TxnCommonUtils extends Object
| Constructor and Description |
|---|
TxnCommonUtils() |
| Modifier and Type | Method and Description |
|---|---|
static ValidReaderWriteIdList |
createValidReaderWriteIdList(TableValidWriteIds tableWriteIds)
Transform a
TableValidWriteIds to a
ValidReaderWriteIdList. |
static ValidTxnList |
createValidReadTxnList(GetOpenTxnsResponse txns,
long currentTxn)
Transform a
GetOpenTxnsResponse to a
ValidTxnList. |
static ValidTxnWriteIdList |
createValidTxnWriteIdList(Long currentTxnId,
List<TableValidWriteIds> validIds)
Transform a
GetValidWriteIdsResponse to a
ValidTxnWriteIdList. |
public static ValidTxnList createValidReadTxnList(GetOpenTxnsResponse txns, long currentTxn)
GetOpenTxnsResponse to a
ValidTxnList. This assumes that the caller intends to
read the files, and thus treats both open and aborted transactions as invalid.txns - txn list from the metastorecurrentTxn - Current transaction that the user has open. If this is greater than 0 it
will be removed from the exceptions list so that the user sees his own
transaction as valid.public static ValidTxnWriteIdList createValidTxnWriteIdList(Long currentTxnId, List<TableValidWriteIds> validIds)
GetValidWriteIdsResponse to a
ValidTxnWriteIdList. This assumes that the caller intends to
read the files, and thus treats both open and aborted transactions as invalid.currentTxnId - current txn ID for which we get the valid write ids listvalidIds - valid write ids list from the metastorepublic static ValidReaderWriteIdList createValidReaderWriteIdList(TableValidWriteIds tableWriteIds)
TableValidWriteIds to a
ValidReaderWriteIdList. This assumes that the caller intends to
read the files, and thus treats both open and aborted write ids as invalid.tableWriteIds - valid write ids for the given table from the metastoreCopyright © 2024 The Apache Software Foundation. All rights reserved.