HIVE-19476: Fix failures in TestReplicationScenariosAcidTables, TestReplicationOnHDFSEncryptedZones and TestCopyUtils (Sankar Hariappan, reviewed by Sergey Shelukhin)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/a26f03e9 Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/a26f03e9 Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/a26f03e9 Branch: refs/heads/branch-3 Commit: a26f03e99712c95f4b59b5949a7542e581983aa1 Parents: cbe8e61 Author: Sankar Hariappan <[email protected]> Authored: Sat May 12 20:32:08 2018 +0530 Committer: sergey <[email protected]> Committed: Tue Jun 5 12:17:32 2018 -0700 ---------------------------------------------------------------------- .../TestReplicationOnHDFSEncryptedZones.java | 2 +- .../ql/parse/repl/dump/io/FileOperations.java | 19 ++++--------------- 2 files changed, 5 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/a26f03e9/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationOnHDFSEncryptedZones.java ---------------------------------------------------------------------- diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationOnHDFSEncryptedZones.java b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationOnHDFSEncryptedZones.java index 1846c21..7557280 100644 --- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationOnHDFSEncryptedZones.java +++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationOnHDFSEncryptedZones.java @@ -110,7 +110,7 @@ public class TestReplicationOnHDFSEncryptedZones { replica .run("repl load " + replicatedDbName + " from '" + tuple.dumpLocation + "' with('hive.repl.add.raw.reserved.namespace'='true', " - + "'distcp.options.pugpbx'='', 'distcp.options.skipcrccheck'='', 'distcp.options.update'='')") + + "'distcp.options.pugpbx'='', 'distcp.options.skipcrccheck'='')") .run("use " + replicatedDbName) .run("repl status " + replicatedDbName) .verifyResult(tuple.lastReplicationId) http://git-wip-us.apache.org/repos/asf/hive/blob/a26f03e9/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/dump/io/FileOperations.java ---------------------------------------------------------------------- diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/dump/io/FileOperations.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/dump/io/FileOperations.java index b61a945..b3e76b6 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/dump/io/FileOperations.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/dump/io/FileOperations.java @@ -133,27 +133,16 @@ public class FileOperations { return validPaths; } - /** * This needs the root data directory to which the data needs to be exported to. * The data export here is a list of files either in table/partition that are written to the _files - * in the exportRootDataDir provided. + * in the exportRootDataDir provided. In case of MM/ACID tables, we expect this pathlist to be + * already passed as valid paths by caller based on ValidWriteIdList. So, mmCtx is ignored here. */ private void exportFilesAsList() throws SemanticException, IOException { try (BufferedWriter writer = writer()) { - if (mmCtx != null) { - assert dataPathList.size() == 1; - Path dataPath = dataPathList.get(0); - ValidWriteIdList ids = AcidUtils.getTableValidWriteIdList( - hiveConf, mmCtx.getFqTableName()); - List<Path> validPaths = getMmValidPaths(ids, dataPath); - for (Path mmPath : validPaths) { - writeFilesList(listFilesInDir(mmPath), writer, AcidUtils.getAcidSubDir(dataPath)); - } - } else { - for (Path dataPath : dataPathList) { - writeFilesList(listFilesInDir(dataPath), writer, AcidUtils.getAcidSubDir(dataPath)); - } + for (Path dataPath : dataPathList) { + writeFilesList(listFilesInDir(dataPath), writer, AcidUtils.getAcidSubDir(dataPath)); } } }
