public static boolean fileExists(Path filePath, HiveConf hiveConf) throws IOException {
    FileSystem fs = filePath.getFileSystem(hiveConf);
    if (fs.exists(filePath)) {
      return true;
    }
    return false;
  }
Given a ReplChangeManger's encoded uri, it replaces the nameservice and returns the modified encoded uri.
ql/src/java/org/apache/hadoop/hive/ql/parse/repl/dump/Utils.java