List<EximUtil.DataCopyPath> dumpFunctionMetadata(String dbName, Path dbMetadataRoot, Path dbDataRoot,
                                                             Hive hiveDb, boolean copyAtLoad) throws Exception {
    List<EximUtil.DataCopyPath> functionsBinaryCopyPaths = new ArrayList<>();
    Path functionsMetaRoot = new Path(dbMetadataRoot, ReplUtils.FUNCTIONS_ROOT_DIR_NAME);
    Path functionsDataRoot = new Path(dbDataRoot, ReplUtils.FUNCTIONS_ROOT_DIR_NAME);
    List<String> functionNames = hiveDb.getFunctions(dbName, "*");
    for (String functionName : functionNames) {
      HiveWrapper.Tuple<Function> tuple = functionTuple(functionName, dbName, hiveDb);
      if (tuple == null) {
        continue;
      }
      Path functionMetaRoot = new Path(functionsMetaRoot, functionName);
      Path functionMetadataFile = new Path(functionMetaRoot, FUNCTION_METADATA_FILE_NAME);
      Path functionDataRoot = new Path(functionsDataRoot, functionName);
      try (JsonWriter jsonWriter =
          new JsonWriter(functionMetadataFile.getFileSystem(conf), functionMetadataFile)) {
        FunctionSerializer serializer = new FunctionSerializer(tuple.object, functionDataRoot, copyAtLoad, conf);
        serializer.writeTo(jsonWriter, tuple.replicationSpec);
        functionsBinaryCopyPaths.addAll(serializer.getFunctionBinaryCopyPaths());
      }
      work.getMetricCollector().reportStageProgress(getName(), ReplUtils.MetricName.FUNCTIONS.name(), 1);
      work.getReplLogger().functionLog(functionName);
    }
    return functionsBinaryCopyPaths;
  }
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