[ https://issues.apache.org/jira/browse/HDFS-9244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15127413#comment-15127413 ]
Andrew Wang commented on HDFS-9244: ----------------------------------- Thanks for working on this Zhe, some code review comments: * getParentEZForPath, we could call getParentINodesInPath and pass it to getEZForPath right? That way we don't have a copy paste. One other note is that "/" is its own parent but right now we return null. Since you can't rename "/" or create a parent for "/" I don't know if this matters. * In createEncryptionZone a nice improvement might be checking that the src exists and isDir and throwing FileNotFoundException if not. The logic is weirdly nested right now, what I'd expect is a sequence of {{if (condition} { throw; } }}. I think this is because we wait until the unprotectedSetXAttrs at the end to throw FNF. * IMO rewording the error message as "Directory %s is already an encryption zone." is more clear. * I remember there being a new TestNestedEZ file, which I assume will make a reappearance before we commit this. That'd be a good place to do the trash-related tests too. I'll play with the unit tests a bit myself to get a feel for what is and isn't allowed, implementation wise it looks like what we discussed on that other JIRA. I'm also okay with the caveat you stated, at first blush it doesn't affect trash support, which is our big concern throughout this. > Support nested encryption zones > ------------------------------- > > Key: HDFS-9244 > URL: https://issues.apache.org/jira/browse/HDFS-9244 > Project: Hadoop HDFS > Issue Type: New Feature > Components: encryption > Reporter: Xiaoyu Yao > Assignee: Zhe Zhang > Attachments: HDFS-9244.00.patch, HDFS-9244.01.patch, > HDFS-9244.02.patch, HDFS-9244.03.patch > > > This JIRA is opened to track adding support of nested encryption zone based > on [~andrew.wang]'s [comment > |https://issues.apache.org/jira/browse/HDFS-8747?focusedCommentId=14654141&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14654141] > for certain use cases. -- This message was sent by Atlassian JIRA (v6.3.4#6332)