private String getNextDumpDir() {
    if (conf.getBoolVar(HiveConf.ConfVars.HIVE_IN_TEST)) {
      // make it easy to write .q unit tests, instead of unique id generation.
      // however, this does mean that in writing tests, we have to be aware that
      // repl dump will clash with prior dumps, and thus have to clean up properly.
      String nextDump = ReplDumpWork.getInjectNextDumpDirForTest();
      if (nextDump == null) {
        return "next";
      } else {
        return nextDump;
      }
    } else {
      return UUID.randomUUID().toString();
      // TODO: time good enough for now - we'll likely improve this.
      // We may also work in something the equivalent of pid, thrid and move to nanos to ensure
      // uniqueness.
    }
  }
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