private static void updateIfCustomDbLocations(Database database, Configuration conf) throws SemanticException {
    try {
      String whLocatoion = MetastoreConf.getVar(conf, MetastoreConf.ConfVars.WAREHOUSE_EXTERNAL,
              MetastoreConf.getVar(conf, MetastoreConf.ConfVars.WAREHOUSE));
      Path dbDerivedLoc = new Path(whLocatoion, database.getName().toLowerCase() + DATABASE_PATH_SUFFIX);
      String defaultDbLoc = Utilities.getQualifiedPath((HiveConf) conf, dbDerivedLoc);
      database.putToParameters(ReplConst.REPL_IS_CUSTOM_DB_LOC,
              Boolean.toString(!defaultDbLoc.equals(database.getLocationUri())));
      String whManagedLocatoion = MetastoreConf.getVar(conf, MetastoreConf.ConfVars.WAREHOUSE);
      Path dbDerivedManagedLoc = new Path(whManagedLocatoion, database.getName().toLowerCase()
              + DATABASE_PATH_SUFFIX);
      String defaultDbManagedLoc = Utilities.getQualifiedPath((HiveConf) conf, dbDerivedManagedLoc);
      database.getParameters().put(ReplConst.REPL_IS_CUSTOM_DB_MANAGEDLOC, Boolean.toString(
              !(database.getManagedLocationUri() == null
                      ||defaultDbManagedLoc.equals(database.getManagedLocationUri()))));
    } catch (HiveException ex) {
      throw new SemanticException(ex);
    }
  }
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