public void startHeartbeat(long txnId, long lockId, String tableName) {
    if (shuttingDown) {
      throw new IllegalStateException("Service is shutting down, starting new heartbeats is not possible!");
    }
    if (tasks.containsKey(txnId)) {
      throw new IllegalStateException("Heartbeat was already started for TXN " + txnId);
    }
    LOG.info("Submitting heartbeat task for TXN {}", txnId);
    CompactionHeartbeater heartbeater = new CompactionHeartbeater(txnId, lockId, tableName);
    heartbeater.start();
    tasks.put(txnId, heartbeater);
  }
Starts the heartbeat for the given transaction
@param txnId The id of the compaction txn
@param lockId The id of the lock associated with the txn
@param tableName Required for logging only
@throws IllegalStateException Thrown when the heartbeat for the given txn has already been started.
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactionHeartbeatService.java