Repository: hadoop Updated Branches: refs/heads/branch-3.2 f214af74b -> 5afd7efe2
Revert "HDFS-13732. ECAdmin should print the policy name when an EC policy is set. Contributed by Zsolt Venczel." This reverts commit 7dc79a8b5b7af0bf37d25a221be8ed446b0edb74. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/5afd7efe Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/5afd7efe Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/5afd7efe Branch: refs/heads/branch-3.2 Commit: 5afd7efe24e3c40bb01f3b6baa9c25f72797e42d Parents: f214af7 Author: Xiao Chen <x...@apache.org> Authored: Tue Nov 13 12:45:02 2018 -0800 Committer: Xiao Chen <x...@apache.org> Committed: Tue Nov 13 12:45:55 2018 -0800 ---------------------------------------------------------------------- .../main/java/org/apache/hadoop/hdfs/tools/ECAdmin.java | 12 ++++++------ .../src/test/resources/testErasureCodingConf.xml | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/5afd7efe/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/ECAdmin.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/ECAdmin.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/ECAdmin.java index 903a1e2..5f8626e 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/ECAdmin.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/ECAdmin.java @@ -358,16 +358,16 @@ public class ECAdmin extends Configured implements Tool { final DistributedFileSystem dfs = AdminHelper.getDFS(p.toUri(), conf); try { dfs.setErasureCodingPolicy(p, ecPolicyName); - - String actualECPolicyName = dfs.getErasureCodingPolicy(p).getName(); - - System.out.println("Set " + actualECPolicyName + - " erasure coding policy on "+ path); + if (ecPolicyName == null){ + ecPolicyName = "default"; + } + System.out.println("Set " + ecPolicyName + " erasure coding policy on" + + " " + path); RemoteIterator<FileStatus> dirIt = dfs.listStatusIterator(p); if (dirIt.hasNext()) { System.out.println("Warning: setting erasure coding policy on a " + "non-empty directory will not automatically convert existing " + - "files to " + actualECPolicyName + " erasure coding policy"); + "files to " + ecPolicyName + " erasure coding policy"); } } catch (Exception e) { System.err.println(AdminHelper.prettifyException(e)); http://git-wip-us.apache.org/repos/asf/hadoop/blob/5afd7efe/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testErasureCodingConf.xml ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testErasureCodingConf.xml b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testErasureCodingConf.xml index 34f5176..6411fe6 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testErasureCodingConf.xml +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testErasureCodingConf.xml @@ -734,7 +734,7 @@ <comparators> <comparator> <type>SubstringComparator</type> - <expected-output>Set RS-6-3-1024k erasure coding policy on /ecdir</expected-output> + <expected-output>Set default erasure coding policy on /ecdir</expected-output> </comparator> </comparators> </test> @@ -752,11 +752,11 @@ <comparators> <comparator> <type>SubstringComparator</type> - <expected-output>Set RS-6-3-1024k erasure coding policy on /ecdir</expected-output> + <expected-output>Set default erasure coding policy on /ecdir</expected-output> </comparator> <comparator> <type>SubstringComparator</type> - <expected-output>Warning: setting erasure coding policy on a non-empty directory will not automatically convert existing files to RS-6-3-1024k erasure coding policy</expected-output> + <expected-output>Warning: setting erasure coding policy on a non-empty directory will not automatically convert existing files to default erasure coding policy</expected-output> </comparator> </comparators> </test> --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org