public List<String> getFileAsList(Path listOfTablesFile, HiveConf conf) throws SemanticException {
    Retryable retryable = Retryable.builder()
            .withHiveConf(conf)
            .withRetryOnException(IOException.class).build();
    try {
      return retryable.executeCallable(() -> {
        List<String> list = new ArrayList<>();
        InputStream is = null;
        try {
          FileSystem fs = getFileSystem(listOfTablesFile, conf);
          FileStatus fileStatus = fs.getFileStatus(listOfTablesFile);
          if (fileStatus == null) {
            throw new SemanticException("Table list file not found: " + listOfTablesFile);
          }
          is = fs.open(listOfTablesFile);
          list.addAll(IOUtils.readLines(is, Charset.defaultCharset()));
          return list;
        } finally {
          org.apache.hadoop.io.IOUtils.closeStream(is);
        }
      });
    } catch (Exception e) {
      throw new SemanticException(e);
    }
  }
Helper class to create export/import request.
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/atlas/AtlasRequestBuilder.java