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 4b0b083710..5f4e738476 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 int run(Configuration conf, List args) throws IOException { 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 "