[
https://issues.apache.org/jira/browse/HDFS-13292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16406351#comment-16406351
]
Rushabh S Shah commented on HDFS-13292:
---------------------------------------
{quote} I think because of {{.Trash}} it is giving "non empty directory
exception".
{quote}
Yup, you are right. For some reason I missed the fact that it created EZ with
key1 and it was failing while trying to create EZ with key2.
bq.But in current code it is 3, 1, 2.
I don't have any preference regarding the order of steps in which they occur as
long as it throws an exception and not succeed.
The only downside of throwing {{not an empty directory}} exception first is
some user might delete the contents of directory and not realize it is already
in an EZ.
Since creation of zone is a super-user command only, I would expect the admin
will have some basic understanding of this command.
> Crypto command should give proper exception when key is already exist for
> zone directory
> ----------------------------------------------------------------------------------------
>
> Key: HDFS-13292
> URL: https://issues.apache.org/jira/browse/HDFS-13292
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: hdfs, kms
> Affects Versions: 2.8.3
> Reporter: Harshakiran Reddy
> Priority: Major
>
> {{Scenario:}}
> # Create a Dir
> # Create EZ for the above dir with Key1
> # Again you can try to create ZONE for same directory with Diff Key i.e Key2
> {noformat}
> hadoopclient> hadoop key list
> Listing keys for KeyProvider:
> org.apache.hadoop.crypto.key.kms.LoadBalancingKMSClientProvider@152aa092
> key2
> key1
> hadoopclient> hdfs dfs -mkdir /kms
> hadoopclient> hdfs dfs -put bigdata_env /kms/file1
> hadoopclient> hdfs crypto -createZone -keyName key1 -path /kms
> RemoteException: Attempt to create an encryption zone for a non-empty
> directory.
> hadoopclient> hdfs dfs -rmr /kms/file1
> rmr: DEPRECATED: Please use '-rm -r' instead.
> Deleted /kms/file1
> hadoopclient> hdfs crypto -createZone -keyName key1 -path /kms
> Added encryption zone /kms
> hadoopclient> hdfs crypto -createZone -keyName key2 -path /kms
> RemoteException: Attempt to create an encryption zone for a non-empty
> directory.
> hadoopclient>
> {noformat}
> Actual Output:
> ===========
> {{Exception should be Like Dir already having the ZONE will not allow to
> create new ZONE on this Dir}}
> Expected Output:
> =============
> {{RemoteException:Attempt to create an encryption zone for non-empty
> directory}}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]