HDFS-13114. CryptoAdmin#ReencryptZoneCommand should resolve Namespace info from path. Contributed by Hanisha Koneru.

This commit is contained in:
Xiaoyu Yao 2018-02-27 19:50:00 -08:00
parent edc9f1451b
commit 2574375bf5

View File

@ -337,8 +337,8 @@ public int run(Configuration conf, List<String> 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 "