pkumarsinha commented on a change in pull request #1883: URL: https://github.com/apache/hive/pull/1883#discussion_r565057506
########## File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/atlas/AtlasRequestBuilder.java ########## @@ -105,6 +126,50 @@ private String getQualifiedName(String clusterName, String srcDb) { return qualifiedName; } + private String getQualifiedName(String clusterName, String srcDB, String tableName) { + String qualifiedTableName = String.format(QUALIFIED_NAME_HIVE_TABLE_FORMAT, srcDB, tableName); + return getQualifiedName(clusterName, qualifiedTableName); + } + + private List<String> getQualifiedNames(String clusterName, String srcDb, Path listOfTablesFile, HiveConf conf) + throws SemanticException { + List<String> qualifiedNames = new ArrayList<>(); + List<String> tableNames = getFileAsList(listOfTablesFile, conf); + if (CollectionUtils.isEmpty(tableNames)) { + LOG.info("Empty file encountered: {}", listOfTablesFile); + return qualifiedNames; + } + for (String tableName : tableNames) { + qualifiedNames.add(getQualifiedName(clusterName, srcDb, tableName)); + } + return qualifiedNames; + } + + private static List<String> getFileAsList(Path listOfTablesFile, HiveConf conf) throws SemanticException { + List<String> list = new ArrayList<>(); + InputStream is = null; + try { + FileSystem fs = FileSystem.get(listOfTablesFile.toUri(), conf); Review comment: No, doesn't look like. The FS creation looks proper so should work in those cases. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org