hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rushabh S Shah (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HDFS-12586) EZ createZone returns IllegalArgumentException when using protocol in path
Date Tue, 03 Oct 2017 20:06:00 GMT
Rushabh S Shah created HDFS-12586:
-------------------------------------

             Summary: EZ createZone returns IllegalArgumentException when using protocol in
path
                 Key: HDFS-12586
                 URL: https://issues.apache.org/jira/browse/HDFS-12586
             Project: Hadoop HDFS
          Issue Type: Bug
            Reporter: Rushabh S Shah
            Assignee: Rushabh S Shah


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.
{code:title=HdfsAdmin.java|borderStyle=solid}
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() + "?");
    }
{code}
It is comparing the {{supplied path}} with path component of {{EncryptionZone#path}} which
doesn't contain scheme and authority.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org


Mime
View raw message