public static void createDbExportDump(FileSystem fs, Path metadataPath, Database dbObj,
      ReplicationSpec replicationSpec, Configuration conf) throws IOException, SemanticException {
    updateIfCustomDbLocations(dbObj, conf);

    // WARNING NOTE : at this point, createDbExportDump lives only in a world where ReplicationSpec is in replication scope
    // If we later make this work for non-repl cases, analysis of this logic might become necessary. Also, this is using
    // Replv2 semantics, i.e. with listFiles laziness (no copy at export time)

    // Remove all the entries from the parameters which are added by repl tasks internally.
    Map<String, String> parameters = dbObj.getParameters();
    if (parameters != null) {
      Map<String, String> tmpParameters = new HashMap<>(parameters);
      tmpParameters.entrySet()
                .removeIf(e -> e.getKey().startsWith(ReplConst.BOOTSTRAP_DUMP_STATE_KEY_PREFIX)
                            || e.getKey().equals(ReplConst.REPL_TARGET_DB_PROPERTY)
                            || e.getKey().equals(ReplConst.SOURCE_OF_REPLICATION)
                            || e.getKey().equals(ReplConst.REPL_FIRST_INC_PENDING_FLAG)
                            || e.getKey().equals(ReplConst.REPL_FAILOVER_ENDPOINT));
      dbObj.setParameters(tmpParameters);
    }
    try (JsonWriter jsonWriter = new JsonWriter(fs, metadataPath)) {
      new DBSerializer(dbObj).writeTo(jsonWriter, replicationSpec);
    }
    if (parameters != null) {
      dbObj.setParameters(parameters);
    }
  }
Initialize the URI where the exported data collection is
to created for export, or is present for import
ql/src/java/org/apache/hadoop/hive/ql/parse/EximUtil.java