HDFS-13114. CryptoAdmin#ReencryptZoneCommand should resolve Namespace info from path. Contributed by Hanisha Koneru.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/2574375b Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/2574375b Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/2574375b Branch: refs/heads/HDFS-7240 Commit: 2574375bf571b1fbc15ede7ba3b2826dc1dd3e70 Parents: edc9f14 Author: Xiaoyu Yao <x...@apache.org> Authored: Tue Feb 27 19:50:00 2018 -0800 Committer: Xiaoyu Yao <x...@apache.org> Committed: Wed Feb 28 08:37:01 2018 -0800 ---------------------------------------------------------------------- .../src/main/java/org/apache/hadoop/hdfs/tools/CryptoAdmin.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/2574375b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/CryptoAdmin.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/CryptoAdmin.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/CryptoAdmin.java index 4b0b083..5f4e738 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/CryptoAdmin.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/CryptoAdmin.java @@ -337,8 +337,8 @@ public class CryptoAdmin extends Configured implements Tool { action = ReencryptAction.CANCEL; } - final HdfsAdmin admin = - new HdfsAdmin(FileSystem.getDefaultUri(conf), conf); + Path p = new Path(path); + final HdfsAdmin admin = new HdfsAdmin(p.toUri(), conf); try { admin.reencryptEncryptionZone(new Path(path), action); System.out.println("re-encrypt command successfully submitted for " --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org