@InterfaceAudience.Private
@InterfaceStability.Evolving
public interface TxnStore
extends org.apache.hadoop.conf.Configurable
| Modifier and Type | Interface and Description |
|---|---|
static class |
TxnStore.MUTEX_KEY |
static interface |
TxnStore.MutexAPI
This is primarily designed to provide coarse-grained mutex support to operations running
inside the Metastore (of which there could be several instances).
|
| Modifier and Type | Field and Description |
|---|---|
static char |
ABORT_TXN_CLEANUP_TYPE |
static String |
ABORTED_RESPONSE |
static char |
ABORTED_STATE |
static String |
CLEANING_RESPONSE |
static String[] |
COMPACTION_STATES |
static char |
DID_NOT_INITIATE |
static String |
DID_NOT_INITIATE_RESPONSE |
static String |
FAILED_RESPONSE |
static char |
FAILED_STATE |
static String |
INITIATED_RESPONSE |
static char |
INITIATED_STATE |
static char |
MAJOR_TYPE |
static char |
MINOR_TYPE |
static String |
POOL_COMPACTOR |
static String |
POOL_MUTEX |
static String |
POOL_TX |
static char |
READY_FOR_CLEANING |
static char |
REBALANCE_TYPE |
static String |
REFUSED_RESPONSE |
static char |
REFUSED_STATE |
static String |
SUCCEEDED_RESPONSE |
static char |
SUCCEEDED_STATE |
static int |
TIMED_OUT_TXN_ABORT_BATCH_SIZE |
static String |
TXN_KEY_START
Prefix for key when committing with a key/value.
|
static String |
WORKING_RESPONSE |
static char |
WORKING_STATE |
| Modifier and Type | Method and Description |
|---|---|
AbortCompactResponse |
abortCompactions(AbortCompactionRequest rqst)
Abort (rollback) a compaction.
|
void |
abortTxn(AbortTxnRequest rqst)
Abort (rollback) a transaction.
|
void |
abortTxns(AbortTxnsRequest rqst)
Abort (rollback) a list of transactions in one request.
|
void |
addDynamicPartitions(AddDynamicPartitions rqst)
Add information on a set of dynamic partitions that participated in a transaction.
|
void |
addWriteIdsToMinHistory(long txnId,
Map<String,Long> minOpenWriteIds) |
void |
addWriteNotificationLog(ListenerEvent acidWriteEvent)
Add the ACID write event information to writeNotificationLog table.
|
AllocateTableWriteIdsResponse |
allocateTableWriteIds(AllocateTableWriteIdsRequest rqst)
Allocate a write ID for the given table and associate it with a transaction
|
boolean |
checkFailedCompactions(CompactionInfo ci)
Determine if there are enough consecutive failures compacting a table or partition that no
new automatic compactions should be scheduled.
|
LockResponse |
checkLock(CheckLockRequest rqst)
Check whether a lock has been obtained.
|
void |
cleanEmptyAbortedAndCommittedTxns()
Clean up aborted or committed transactions from txns that have no components in txn_components.
|
void |
cleanTxnToWriteIdTable()
Clean up entries from TXN_TO_WRITE_ID table less than min_uncommited_txnid as found by
min(max(TXNS.txn_id), min(WRITE_SET.WS_COMMIT_ID), min(Aborted TXNS.txn_id)).
|
long |
cleanupMaterializationRebuildLocks(ValidTxnList validTxnList,
long timeout) |
default void |
cleanupRecords(HiveObjectType type,
Database db,
Table table,
Iterator<Partition> partitionIterator)
Clean up corresponding records in metastore tables.
|
void |
cleanupRecords(HiveObjectType type,
Database db,
Table table,
Iterator<Partition> partitionIterator,
boolean keepTxnToWriteIdMetaData) |
void |
cleanupRecords(HiveObjectType type,
Database db,
Table table,
Iterator<Partition> partitionIterator,
long txnId) |
void |
clearCleanerStart(CompactionInfo info)
Removes the cleaning start time for a particular compaction
|
void |
commitTxn(CommitTxnRequest rqst)
Commit a transaction
|
CompactionResponse |
compact(CompactionRequest rqst)
Submit a compaction request into the queue.
|
void |
countOpenTxns()
Get the count for open transactions.
|
List<String> |
findColumnsWithStats(CompactionInfo ci)
Queries metastore DB directly to find columns in the table which have statistics information.
|
long |
findMinOpenTxnIdForCleaner()
Return the currently seen minimum open transaction ID.
|
long |
findMinTxnIdSeenOpen()
Deprecated.
remove when min_history_level table is dropped
|
CompactionInfo |
findNextToCompact(FindNextCompactRequest rqst)
This will grab the next compaction request off of the queue, and assign it to the worker.
|
CompactionInfo |
findNextToCompact(String workerId)
Deprecated.
|
Set<CompactionInfo> |
findPotentialCompactions(int abortedThreshold,
long abortedTimeThreshold)
This will look through the completed_txn_components table and look for partitions or tables
that may be ready for compaction.
|
Set<CompactionInfo> |
findPotentialCompactions(int abortedThreshold,
long abortedTimeThreshold,
long lastChecked) |
List<CompactionInfo> |
findReadyToClean(long minOpenTxnWaterMark,
long retentionTime)
Find entries in the queue that are ready to
be cleaned.
|
List<CompactionInfo> |
findReadyToCleanAborts(long abortedTimeThreshold,
int abortedThreshold)
Find the aborted entries in TXN_COMPONENTS which can be used to
clean directories belonging to transactions in aborted state.
|
Optional<CompactionInfo> |
getCompactionByTxnId(long txnId)
Returns the compaction running in the transaction txnId
|
CompactionMetricsData |
getCompactionMetricsData(String dbName,
String tblName,
String partitionName,
CompactionMetricsData.MetricType type)
Returns ACID metrics related info for a specific resource and metric type.
|
MultiDataSourceJdbcResource |
getJdbcResourceHolder() |
GetLatestCommittedCompactionInfoResponse |
getLatestCommittedCompactionInfo(GetLatestCommittedCompactionInfoRequest rqst)
Get one latest record of SUCCEEDED or READY_FOR_CLEANING compaction for a table/partition.
|
long |
getLatestTxnIdInConflict(long txnid) |
Materialization |
getMaterializationInvalidationInfo(CreationMetadata cm,
String validTxnList)
Get invalidation info for the materialization.
|
MaxAllocatedTableWriteIdResponse |
getMaxAllocatedTableWrited(MaxAllocatedTableWriteIdRequest rqst)
Reads the maximum allocated writeId for the given table
|
MetricsInfo |
getMetricsInfo()
Returns ACID metadata related metrics info.
|
TxnStore.MutexAPI |
getMutexAPI() |
int |
getNumLocks() |
GetOpenTxnsResponse |
getOpenTxns()
Get list of valid transactions.
|
GetOpenTxnsResponse |
getOpenTxns(List<TxnType> excludeTxnTypes)
Get list of valid transactions.
|
GetOpenTxnsInfoResponse |
getOpenTxnsInfo()
Get information about open transactions.
|
long |
getOpenTxnTimeOutMillis() |
SqlRetryHandler |
getRetryHandler() |
long |
getTargetTxnId(String replPolicy,
long sourceTxnId) |
List<CompactionMetricsData> |
getTopCompactionMetricsDataPerType(int limit)
Returns the top ACID metrics from each type
CompactionMetricsData.MetricType |
long |
getTxnIdForWriteId(String dbName,
String tblName,
long writeId) |
GetValidWriteIdsResponse |
getValidWriteIds(GetValidWriteIdsRequest rqst)
Gets the list of valid write ids for the given table wrt to current txn
|
void |
heartbeat(HeartbeatRequest ids)
Send a heartbeat for a lock or a transaction
|
boolean |
heartbeatLockMaterializationRebuild(String dbName,
String tableName,
long txnId) |
HeartbeatTxnRangeResponse |
heartbeatTxnRange(HeartbeatTxnRangeRequest rqst)
Heartbeat a group of transactions together
|
LockResponse |
lock(LockRequest rqst)
Obtain a lock.
|
LockResponse |
lockMaterializationRebuild(String dbName,
String tableName,
long txnId) |
void |
markCleaned(CompactionInfo info)
This will remove an entry from the queue after
it has been compacted.
|
void |
markCleanerStart(CompactionInfo info)
Sets the cleaning start time for a particular compaction
|
void |
markCompacted(CompactionInfo info)
This will mark an entry in the queue as compacted
and put it in the ready to clean state.
|
void |
markFailed(CompactionInfo info)
Mark a compaction entry as failed.
|
void |
markRefused(CompactionInfo info)
Mark a compaction as refused (to run).
|
void |
onRename(String oldCatName,
String oldDbName,
String oldTabName,
String oldPartName,
String newCatName,
String newDbName,
String newTabName,
String newPartName) |
OpenTxnsResponse |
openTxns(OpenTxnRequest rqst)
Open a set of transactions
|
void |
performTimeOuts()
Timeout transactions and/or locks.
|
void |
performWriteSetGC()
WriteSet tracking is used to ensure proper transaction isolation.
|
void |
purgeCompactionHistory()
For any given compactable entity (partition, table if not partitioned) the history of compactions
may look like "sssfffaaasffss", for example.
|
void |
removeCompactionMetricsData(String dbName,
String tblName,
String partitionName,
CompactionMetricsData.MetricType type)
Remove records from the compaction metrics cache matching the filter criteria passed in as parameters
|
void |
removeDuplicateCompletedTxnComponents()
De-duplicate entries from COMPLETED_TXN_COMPONENTS table.
|
void |
replTableWriteIdState(ReplTblWriteIdStateRequest rqst)
Replicate Table Write Ids state to mark aborted write ids and writeid high water mark.
|
void |
revokeFromLocalWorkers(String hostname)
This will take all entries assigned to workers
on a host return them to INITIATED state.
|
void |
revokeTimedoutWorkers(long timeout)
This call will return all compaction queue
entries assigned to a worker but over the timeout back to the initiated state.
|
void |
seedTxnId(SeedTxnIdRequest rqst)
Sets the next txnId to the given value.
|
void |
seedWriteId(SeedTableWriteIdsRequest rqst)
Called on conversion of existing table to full acid.
|
void |
setCleanerRetryRetentionTimeOnError(CompactionInfo info)
Stores the value of
CompactionInfo.retryRetention and CompactionInfo.errorMessage fields
of the CompactionInfo either by inserting or updating the fields in the HMS database. |
void |
setHadoopJobId(String hadoopJobId,
long id)
Once a
ThreadPoolExecutor Worker submits a job to the cluster,
it calls this to update the metadata. |
void |
setOpenTxnTimeOutMillis(long openTxnTimeOutMillis) |
long |
setTimeout(long milliseconds) |
ShowCompactResponse |
showCompact(ShowCompactRequest rqst)
Show list of current compactions.
|
ShowLocksResponse |
showLocks(ShowLocksRequest rqst)
Get information on current locks.
|
boolean |
submitForCleanup(CompactionRequest rqst,
long highestWriteId,
long txnId) |
void |
unlock(UnlockRequest rqst)
Unlock a lock.
|
boolean |
updateCompactionMetricsData(CompactionMetricsData data)
Create, update or delete one record in the compaction metrics cache.
|
void |
updateCompactorState(CompactionInfo ci,
long compactionTxnId)
This updates COMPACTION_QUEUE.
|
void |
updateTransactionStatistics(UpdateTransactionalStatsRequest req) |
static final String TXN_KEY_START
static final String INITIATED_RESPONSE
static final String WORKING_RESPONSE
static final String CLEANING_RESPONSE
static final String FAILED_RESPONSE
static final String SUCCEEDED_RESPONSE
static final String DID_NOT_INITIATE_RESPONSE
static final String REFUSED_RESPONSE
static final String ABORTED_RESPONSE
static final char INITIATED_STATE
static final char WORKING_STATE
static final char READY_FOR_CLEANING
static final char FAILED_STATE
static final char SUCCEEDED_STATE
static final char DID_NOT_INITIATE
static final char REFUSED_STATE
static final char ABORTED_STATE
static final char MAJOR_TYPE
static final char MINOR_TYPE
static final char REBALANCE_TYPE
static final char ABORT_TXN_CLEANUP_TYPE
static final String[] COMPACTION_STATES
static final int TIMED_OUT_TXN_ABORT_BATCH_SIZE
static final String POOL_TX
static final String POOL_MUTEX
static final String POOL_COMPACTOR
SqlRetryHandler getRetryHandler()
SqlRetryHandler instance used by TxnStore.MultiDataSourceJdbcResource getJdbcResourceHolder()
MultiDataSourceJdbcResource instance used by TxnStore.@Transactional(value="txnhandler") GetOpenTxnsInfoResponse getOpenTxnsInfo() throws MetaException
MetaException@Transactional(value="txnhandler") GetOpenTxnsResponse getOpenTxns() throws MetaException
MetaException@Transactional(value="txnhandler") GetOpenTxnsResponse getOpenTxns(List<TxnType> excludeTxnTypes) throws MetaException
excludeTxnTypes - : excludes this type of txns while getting the open txnsMetaException@Transactional(value="txnhandler")
void countOpenTxns()
throws MetaException
MetaException@Transactional(value="txnhandler",
noRollbackFor=SqlRetryException.class)
OpenTxnsResponse openTxns(OpenTxnRequest rqst)
throws MetaException
rqst - request to open transactionsMetaException@Transactional(value="txnhandler") long getTargetTxnId(String replPolicy, long sourceTxnId) throws MetaException
MetaException@Transactional(value="txnhandler") void abortTxn(AbortTxnRequest rqst) throws NoSuchTxnException, MetaException, TxnAbortedException
rqst - info on transaction to abortNoSuchTxnExceptionMetaExceptionTxnAbortedException@Transactional(value="txnhandler") void abortTxns(AbortTxnsRequest rqst) throws NoSuchTxnException, MetaException
rqst - info on transactions to abortNoSuchTxnExceptionMetaException@Transactional(value="txnhandler",
noRollbackFor=org.apache.hadoop.hive.metastore.api.TxnAbortedException.class)
void commitTxn(CommitTxnRequest rqst)
throws NoSuchTxnException,
TxnAbortedException,
MetaException
rqst - info on transaction to commitNoSuchTxnExceptionTxnAbortedExceptionMetaException@Transactional(value="txnhandler") void replTableWriteIdState(ReplTblWriteIdStateRequest rqst) throws MetaException
rqst - info on table/partitions and writeid snapshot to replicate.MetaException - in case of failure@Transactional(value="txnhandler") void updateTransactionStatistics(UpdateTransactionalStatsRequest req) throws MetaException
MetaException@Transactional(value="txnhandler") Materialization getMaterializationInvalidationInfo(CreationMetadata cm, String validTxnList) throws MetaException
cm - creation metadata for the materializationvalidTxnList - valid transaction list for snapshot taken for current queryMetaExceptionlong getTxnIdForWriteId(String dbName, String tblName, long writeId) throws MetaException
MetaException@Transactional(value="txnhandler")
long getLatestTxnIdInConflict(long txnid)
throws MetaException
MetaException@Transactional(value="txnhandler") LockResponse lockMaterializationRebuild(String dbName, String tableName, long txnId) throws MetaException
MetaException@Transactional(value="txnhandler") boolean heartbeatLockMaterializationRebuild(String dbName, String tableName, long txnId) throws MetaException
MetaException@Transactional(value="txnhandler") long cleanupMaterializationRebuildLocks(ValidTxnList validTxnList, long timeout) throws MetaException
MetaException@Transactional(value="txnhandler") GetValidWriteIdsResponse getValidWriteIds(GetValidWriteIdsRequest rqst) throws NoSuchTxnException, MetaException
rqst - info on transaction and list of table names associated with given transactionNoSuchTxnExceptionMetaException@Transactional(value="txnhandler")
void addWriteIdsToMinHistory(long txnId,
Map<String,Long> minOpenWriteIds)
throws MetaException
MetaException@Transactional(value="txnhandler") AllocateTableWriteIdsResponse allocateTableWriteIds(AllocateTableWriteIdsRequest rqst) throws NoSuchTxnException, TxnAbortedException, MetaException
rqst - info on transaction and table to allocate write idNoSuchTxnExceptionTxnAbortedExceptionMetaException@Transactional(value="txnhandler") MaxAllocatedTableWriteIdResponse getMaxAllocatedTableWrited(MaxAllocatedTableWriteIdRequest rqst) throws MetaException
rqst - table for which the maximum writeId is requestedMetaException@Transactional(value="txnhandler") void seedWriteId(SeedTableWriteIdsRequest rqst) throws MetaException
MetaException@Transactional(value="txnhandler") void seedTxnId(SeedTxnIdRequest rqst) throws MetaException
rqst - MetaExceptionLockResponse lock(LockRequest rqst) throws NoSuchTxnException, TxnAbortedException, MetaException
rqst - information on the lock to obtain. If the requester is part of a transaction
the txn information must be included in the lock request.NoSuchTxnExceptionTxnAbortedExceptionMetaException@Transactional(value="txnhandler") LockResponse checkLock(CheckLockRequest rqst) throws NoSuchTxnException, NoSuchLockException, TxnAbortedException, MetaException
lock(org.apache.hadoop.hive.metastore.api.LockRequest) returned a wait
state.rqst - info on the lock to checkNoSuchTxnExceptionNoSuchLockExceptionTxnAbortedExceptionMetaException@Transactional(value="txnhandler") void unlock(UnlockRequest rqst) throws NoSuchLockException, TxnOpenException, MetaException
rqst - lock to unlockNoSuchLockExceptionTxnOpenExceptionMetaException@Transactional(value="txnhandler") ShowLocksResponse showLocks(ShowLocksRequest rqst) throws MetaException
rqst - lock information to retrieveMetaException@Transactional(value="txnhandler") void heartbeat(HeartbeatRequest ids) throws NoSuchTxnException, NoSuchLockException, TxnAbortedException, MetaException
ids - lock and/or txn id to heartbeatNoSuchTxnExceptionNoSuchLockExceptionTxnAbortedExceptionMetaException@Transactional(value="txnhandler") HeartbeatTxnRangeResponse heartbeatTxnRange(HeartbeatTxnRangeRequest rqst) throws MetaException
rqst - set of transactions to heartbatMetaException@Transactional(value="txnhandler") CompactionResponse compact(CompactionRequest rqst) throws MetaException
rqst - information on what to compactMetaException@Transactional(value="txnhandler") boolean submitForCleanup(CompactionRequest rqst, long highestWriteId, long txnId) throws MetaException
MetaException@Transactional(value="txnhandler") ShowCompactResponse showCompact(ShowCompactRequest rqst) throws MetaException
rqst - info on which compactions to showMetaException@Transactional(value="txnhandler") AbortCompactResponse abortCompactions(AbortCompactionRequest rqst) throws NoSuchCompactionException, MetaException
rqst - info on compaction to abortNoSuchCompactionExceptionMetaException@Transactional(value="txnhandler") GetLatestCommittedCompactionInfoResponse getLatestCommittedCompactionInfo(GetLatestCommittedCompactionInfoRequest rqst) throws MetaException
rqst - info on which compaction to retrieveMetaException@Transactional(value="txnhandler") void addDynamicPartitions(AddDynamicPartitions rqst) throws NoSuchTxnException, TxnAbortedException, MetaException
rqst - dynamic partition info.NoSuchTxnExceptionTxnAbortedExceptionMetaException@Transactional(value="txnhandler") default void cleanupRecords(HiveObjectType type, Database db, Table table, Iterator<Partition> partitionIterator) throws MetaException
type - Hive object typedb - database objecttable - table objectpartitionIterator - partition iteratorMetaException@Transactional(value="txnhandler") void cleanupRecords(HiveObjectType type, Database db, Table table, Iterator<Partition> partitionIterator, boolean keepTxnToWriteIdMetaData) throws MetaException
MetaException@Transactional(value="txnhandler") void cleanupRecords(HiveObjectType type, Database db, Table table, Iterator<Partition> partitionIterator, long txnId) throws MetaException
MetaException@Transactional(value="txnhandler") void onRename(String oldCatName, String oldDbName, String oldTabName, String oldPartName, String newCatName, String newDbName, String newTabName, String newPartName) throws MetaException
MetaException@Transactional(value="txnhandler") void performTimeOuts()
@Transactional(value="compactor") Set<CompactionInfo> findPotentialCompactions(int abortedThreshold, long abortedTimeThreshold) throws MetaException
abortedThreshold - number of aborted queries forming a potential compaction request.abortedTimeThreshold - age of an aborted txn in milliseconds that will trigger a
potential compaction request.MetaException@Transactional(value="compactor") Set<CompactionInfo> findPotentialCompactions(int abortedThreshold, long abortedTimeThreshold, long lastChecked) throws MetaException
MetaException@Transactional(value="compactor") void updateCompactorState(CompactionInfo ci, long compactionTxnId) throws MetaException
compactionTxnId was writing to in case it aborts.compactionTxnId - - txnid in which Compactor is runningMetaException@Deprecated @Transactional(value="compactor") CompactionInfo findNextToCompact(String workerId) throws MetaException
findNextToCompact(org.apache.hadoop.hive.metastore.api.FindNextCompactRequest)workerId - id of the worker calling this, will be recorded in the dbMetaException@Transactional(value="compactor") CompactionInfo findNextToCompact(FindNextCompactRequest rqst) throws MetaException
rqst - request to find next compaction to runMetaException@Transactional(value="compactor") void markCompacted(CompactionInfo info) throws MetaException
info - info on the compaction entry to mark as compacted.MetaException@Transactional(value="compactor") List<CompactionInfo> findReadyToClean(long minOpenTxnWaterMark, long retentionTime) throws MetaException
minOpenTxnWaterMark - Minimum open txnIdretentionTime - Milliseconds to delay the cleanerMetaException@Transactional(value="compactor") List<CompactionInfo> findReadyToCleanAborts(long abortedTimeThreshold, int abortedThreshold) throws MetaException
abortedTimeThreshold - Age of table/partition's oldest aborted transaction involving a given table
or partition that will trigger cleanup.abortedThreshold - Number of aborted transactions involving a given table or partition
that will trigger cleanup.MetaException@Transactional(value="compactor") void markCleanerStart(CompactionInfo info) throws MetaException
info - info on the compaction entryMetaException@Transactional(value="compactor") void clearCleanerStart(CompactionInfo info) throws MetaException
info - info on the compaction entryMetaException@Transactional(value="compactor") void markCleaned(CompactionInfo info) throws MetaException
info - info on the compaction entry to removeMetaException@Transactional(value="compactor") void markFailed(CompactionInfo info) throws MetaException
info - information on the compaction that failed.MetaException@Transactional(value="compactor") void markRefused(CompactionInfo info) throws MetaException
info - compaction job.MetaException@Transactional(value="compactor") void setCleanerRetryRetentionTimeOnError(CompactionInfo info) throws MetaException
CompactionInfo.retryRetention and CompactionInfo.errorMessage fields
of the CompactionInfo either by inserting or updating the fields in the HMS database.info - The CompactionInfo object holding the values.MetaException@Transactional(value="compactor")
void cleanTxnToWriteIdTable()
throws MetaException
MetaException@Transactional(value="compactor")
void removeDuplicateCompletedTxnComponents()
throws MetaException
MetaException@Transactional(value="compactor")
void cleanEmptyAbortedAndCommittedTxns()
throws MetaException
markCleaned(CompactionInfo) being called,
or the delete from the txns was delayed because of TXN_OPENTXN_TIMEOUT window.MetaException@Transactional(value="compactor") void revokeFromLocalWorkers(String hostname) throws MetaException
hostname - Name of this host. It is assumed this prefixes the thread's worker id,
so that like hostname% will match the worker id.MetaException@Transactional(value="compactor")
void revokeTimedoutWorkers(long timeout)
throws MetaException
revokeFromLocalWorkers(String) should be called
first.timeout - number of milliseconds since start time that should elapse before a worker is
declared dead.MetaException@Transactional(value="compactor") List<String> findColumnsWithStats(CompactionInfo ci) throws MetaException
ci includes partition info then per partition stats info is examined, otherwise
table level stats are examined.MetaException@Transactional(value="compactor")
void purgeCompactionHistory()
throws MetaException
MetaException@Transactional(value="txnhandler")
void performWriteSetGC()
throws MetaException
MetaException@Transactional(value="compactor") boolean checkFailedCompactions(CompactionInfo ci) throws MetaException
ci - Table or partition to check.MetaException@Transactional(value="txnhandler")
int getNumLocks()
throws SQLException,
MetaException
SQLExceptionMetaExceptionlong setTimeout(long milliseconds)
long getOpenTxnTimeOutMillis()
void setOpenTxnTimeOutMillis(long openTxnTimeOutMillis)
TxnStore.MutexAPI getMutexAPI()
@Transactional(value="compactor") void setHadoopJobId(String hadoopJobId, long id) throws MetaException
ThreadPoolExecutor Worker submits a job to the cluster,
it calls this to update the metadata.id - CompactionInfo.idMetaException@Transactional(value="compactor") void addWriteNotificationLog(ListenerEvent acidWriteEvent) throws MetaException
acidWriteEvent - MetaException@Transactional(value="compactor")
long findMinOpenTxnIdForCleaner()
throws MetaException
MetaException@Transactional(value="compactor") Optional<CompactionInfo> getCompactionByTxnId(long txnId) throws MetaException
txnId - transaction IdMetaException - ex@Transactional(value="compactor") @Deprecated long findMinTxnIdSeenOpen() throws MetaException
MetaException@Transactional(value="txnhandler") MetricsInfo getMetricsInfo() throws MetaException
MetaException@Transactional(value="compactor") CompactionMetricsData getCompactionMetricsData(String dbName, String tblName, String partitionName, CompactionMetricsData.MetricType type) throws MetaException
dbName - name of database, non-nulltblName - name of the table, non-nullpartitionName - name of the partition, can be nulltype - type of the delta metric, non-nullMetaException@Transactional(value="compactor") void removeCompactionMetricsData(String dbName, String tblName, String partitionName, CompactionMetricsData.MetricType type) throws MetaException
dbName - name of the database, non-nulltblName - name of the table, non-nullpartitionName - name of the partition, non-nulltype - type of the delta metric, non-nullMetaException@Transactional(value="compactor") List<CompactionMetricsData> getTopCompactionMetricsDataPerType(int limit) throws MetaException
CompactionMetricsData.MetricTypelimit - number of returned records for each typeMetaException@Transactional(value="compactor") boolean updateCompactionMetricsData(CompactionMetricsData data) throws MetaException
If the metric is not found in the metrics cache, it will be created.
If the metric is found, it will be updated. This operation uses an optimistic locking mechanism, meaning if another operation changed the value of this metric, the update will abort and won't be retried.
If the new metric value is below CompactionMetricsData.getThreshold(), it will be deleted.
data - the object that is used for the operationMetaExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.