protected void writeEncodedDumpFiles(Context withinContext, Iterable<String> files, Path dataPath)
          throws IOException, SemanticException {
    boolean replaceNSInHACase = withinContext.hiveConf.getBoolVar(
            HiveConf.ConfVars.REPL_HA_DATAPATH_REPLACE_REMOTE_NAMESERVICE);
    // encoded filename/checksum of files, write into _files
    try (BufferedWriter fileListWriter = writer(withinContext, dataPath)) {
      for (String file : files) {
        String encodedFilePath = replaceNSInHACase ? Utils.replaceNameserviceInEncodedURI(file, withinContext.hiveConf):
                file;
        fileListWriter.write(encodedFilePath);
        fileListWriter.newLine();
      }
    }
  }
This takes in the string representation of the message in the format as specified in rdbms backing metastore.
ql/src/java/org/apache/hadoop/hive/ql/parse/repl/dump/events/AbstractEventHandler.java