Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
-
None
Description
When trying to create an EZ and sending protocol (hdfs://) as part of the path, -createZone reports an IllegalArgumentException.
IllegalArgumentException: hdfs://<namenode-address>/tmp/fooez1 is not the root of an encryption zone. Do you mean /tmp/fooez1?
Here's a sequence:
1. mkdir the path
bash-4.1$ hadoop fs -mkdir /tmp/fooez1
2. try to make EZ using hdfs protocol, and get error
hdfs crypto -createZone -keyName key1 -path hdfs://<namenode-address>/tmp/fooez1/
IllegalArgumentException: hdfs://<namenode-address>/tmp/fooez1 is not the root of an encryption zone. Do you mean /tmp/fooez1?
It fails while provisioning trash for ez root directory.
The relevant chunk of code.
private void provisionEZTrash(Path path) throws IOException { ... ... String ezPath = ez.getPath(); if (!path.toString().equals(ezPath)) { throw new IllegalArgumentException(path + " is not the root of an " + "encryption zone. Do you mean " + ez.getPath() + "?"); }
It is comparing the supplied path with path component of EncryptionZone#path which doesn't contain scheme and authority.
Attachments
Issue Links
- is duplicated by
-
HDFS-13109 Support fully qualified hdfs path in EZ commands
- Resolved