[ https://issues.apache.org/jira/browse/HDFS-8040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14391656#comment-14391656 ]
Charles Lamb commented on HDFS-8040: ------------------------------------ [~xyao], [~ssath...@hortonworks.com], This is actually correct behavior. If you have an EZ rooted at /user/hrt_qa/encryptionZone_1, it is ok to be able to move around an entire ez to another directory, in this case /user/hrt_qa/encryptionZone_1. That's what HDFS-7530 fixed. Hence, the -rm -r command is effectively a rename of /user/hrt_qa/encryptionZone_1 to /user/hrt_qa/.Trash/Current. Since you're picking up the entire EZ, that's allowed. Does this make sense? > Able to move encryption zone to Trash > ------------------------------------- > > Key: HDFS-8040 > URL: https://issues.apache.org/jira/browse/HDFS-8040 > Project: Hadoop HDFS > Issue Type: Bug > Components: security > Affects Versions: fs-encryption (HADOOP-10150 and HDFS-6134) > Reporter: sumana sathish > > Users can remove encryption directory using the FsShell remove commands > without -skipTrash option. > {code} > /usr/hdp/current/hadoop-hdfs-client/bin/hdfs dfs -D "fs.trash.interval=60" > -rm -r /user/hrt_qa/encryptionZone_1 > 2015-04-01 > 19:19:46,510|beaver.machine|INFO|654|140309507495680|MainThread|15/04/01 > 19:19:46 INFO fs.TrashPolicyDefault: Namenode trash configuration: Deletion > interval = 360 minutes, Emptier interval = 0 minutes. > 2015-04-01 > 19:19:46,534|beaver.machine|INFO|654|140309507495680|MainThread|Moved: > 'hdfs://sumana-dal-secure-4.novalocal:8020/user/hrt_qa/encryptionZone_1' to > trash at: hdfs://sumana-dal-secure-4.novalocal:8020/user/hrt_qa/.Trash/Current > 2015-04-01 > 19:19:46,863|test_TDE_trash|INFO|654|140309507495680|MainThread|Checking if > the encryption zone is in Trash or not > 2015-04-01 > 19:19:46,864|beaver.machine|INFO|654|140309507495680|MainThread|RUNNING: > /usr/hdp/current/hadoop-client/bin/hadoop dfs -ls -R > /user/hrt_qa/.Trash/Current > 2015-04-01 > 19:19:46,892|beaver.machine|INFO|654|140309507495680|MainThread|DEPRECATED: > Use of this script to execute hdfs command is deprecated. > 2015-04-01 > 19:19:46,893|beaver.machine|INFO|654|140309507495680|MainThread|Instead use > the hdfs command for it. > 2015-04-01 19:19:46,893|beaver.machine|INFO|654|140309507495680|MainThread| > 2015-04-01 > 19:19:50,289|beaver.machine|INFO|654|140309507495680|MainThread|drwx------ > - hrt_qa hrt_qa 0 2015-04-01 19:19 /user/hrt_qa/.Trash/Current/user > 2015-04-01 > 19:19:50,292|beaver.machine|INFO|654|140309507495680|MainThread|drwx------ > - hrt_qa hrt_qa 0 2015-04-01 19:19 > /user/hrt_qa/.Trash/Current/user/hrt_qa > 2015-04-01 > 19:19:50,296|beaver.machine|INFO|654|140309507495680|MainThread|drwxr-xr-x > - hrt_qa hrt_qa 0 2015-04-01 19:19 > /user/hrt_qa/.Trash/Current/user/hrt_qa/encryptionZone_1 > 2015-04-01 > 19:19:50,326|beaver.machine|INFO|654|140309507495680|MainThread|-rw-r--r-- > 3 hrt_qa hrt_qa 3273 2015-04-01 19:19 > /user/hrt_qa/.Trash/Current/user/hrt_qa/encryptionZone_1/file_to_get.txt > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)