public class CompactionHeartbeatService extends Object
| Modifier and Type | Method and Description |
|---|---|
static CompactionHeartbeatService |
getInstance(HiveConf conf)
Return the singleton instance of this class.
|
void |
startHeartbeat(long txnId,
long lockId,
String tableName)
Starts the heartbeat for the given transaction
|
void |
stopHeartbeat(long txnId)
Stops the heartbeat for the given transaction
|
public static CompactionHeartbeatService getInstance(HiveConf conf)
conf - The HiveConf used to create the service. Used only during the firsst callCompactionHeartbeatServiceIllegalStateException - Thrown when the service has already been destroyed.public void startHeartbeat(long txnId,
long lockId,
String tableName)
txnId - The id of the compaction txnlockId - The id of the lock associated with the txntableName - Required for logging onlyIllegalStateException - Thrown when the heartbeat for the given txn has already been started.public void stopHeartbeat(long txnId)
throws InterruptedException
txnId - The id of the compaction txnIllegalStateException - Thrown when there is no CompactionHeartbeater task associated with the
given txnId.InterruptedExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.