aasha commented on a change in pull request #1477: URL: https://github.com/apache/hive/pull/1477#discussion_r485347419
########## File path: ql/src/java/org/apache/hadoop/hive/ql/parse/repl/CopyUtils.java ########## @@ -73,21 +73,16 @@ public CopyUtils(String distCpDoAsUser, HiveConf hiveConf, FileSystem destinatio // Used by replication, copy files from source to destination. It is possible source file is // changed/removed during copy, so double check the checksum after copy, // if not match, copy again from cm - public void copyAndVerify(Path destRoot, List<ReplChangeManager.FileInfo> srcFiles, Path origSrcPath, - boolean overwrite) - throws IOException, LoginException, HiveFatalException { + public void copyAndVerify(Path destRoot, List<ReplChangeManager.FileInfo> srcFiles, boolean readSrcAsFilesList, + boolean overwrite) throws IOException, LoginException, HiveFatalException { UserGroupInformation proxyUser = getProxyUser(); if (CollectionUtils.isEmpty(srcFiles)) { throw new IOException(ErrorMsg.REPL_INVALID_ARGUMENTS.format("SrcFiles can not be empty during copy operation.")); } FileSystem sourceFs = srcFiles.get(0).getSrcFs(); boolean useRegularCopy = regularCopy(sourceFs, srcFiles); try { - if (!useRegularCopy) { - srcFiles.clear(); - srcFiles.add(new ReplChangeManager.FileInfo(sourceFs, origSrcPath, null)); - doCopyRetry(sourceFs, srcFiles, destRoot, proxyUser, useRegularCopy, overwrite); - } else { + if (useRegularCopy || readSrcAsFilesList) { Review comment: useRegularCopy is not used in this method. In both if and else it passes the value to doCopyRetry and only doCopyRetry is using its value. Better to use it in doCopyRetry directly instead of passing the value ---------------------------------------------------------------- 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