private boolean isTxnPresentInHiveLocks(long txnId) throws LockException {
    ShowLocksRequest request = new ShowLocksRequest();
    request.setTxnid(txnId);
    HiveLockManager lockManager = getTxnMgr().getLockManager();
    ShowLocksResponse showLocksResponse = ((DbLockManager) lockManager).getLocks(request);
    return !showLocksResponse.getLocks().isEmpty();
  }
Get if there is an entry for the txn id in the hive locks table. It can be in waiting state or acquired state.
@param txnId
@return true if the entry for the txn id is present in hive locks.
@throws LockException
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java