[jira] [Commented] (HDFS-5614) NameNode: implement handling of ACLs in combination with snapshots.

2014-01-31 Thread Jing Zhao (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-5614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13888077#comment-13888077
 ] 

Jing Zhao commented on HDFS-5614:
-

The v2 patch looks great to me. Just some minors:
# Not related to this patch, shall we also use 
INodeWithAdditionalFields#getFeature for INodeDirectory#getDirectoryxxxFeature?
# MiniDFSCluster#getFileSystem returns DistributedFileSystem, thus we do not 
need the following check:
{code}
+FileSystem fs = cluster.getFileSystem();
+assertTrue(fs instanceof DistributedFileSystem);
+hdfs = (DistributedFileSystem)fs;
{code}
# In the INodeDirectory constructor INodeDirectory(INodeDirectory other, 
boolean adopt, boolean copyFeatures), since we want to copy the acl feature 
(and maybe some other features in future), how about defining a constructor 
like INodeDirectory(INodeDirectory other, boolean adopt, 
Feature...featuresToCopy) ?

 NameNode: implement handling of ACLs in combination with snapshots.
 ---

 Key: HDFS-5614
 URL: https://issues.apache.org/jira/browse/HDFS-5614
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: namenode
Affects Versions: HDFS ACLs (HDFS-4685)
Reporter: Chris Nauroth
Assignee: Chris Nauroth
 Attachments: HDFS-5614.1.patch, HDFS-5614.2.patch


 Within a snapshot, all ACLs are frozen at the moment that the snapshot was 
 created.  ACL changes in the parent of the snapshot are not applied to the 
 snapshot.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Commented] (HDFS-5614) NameNode: implement handling of ACLs in combination with snapshots.

2014-01-31 Thread Jing Zhao (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-5614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13888222#comment-13888222
 ] 

Jing Zhao commented on HDFS-5614:
-

bq. One slightly messy aspect of this change
Yeah, you're right. Or we can pass in a Feature.class array here? I think we 
can also revisit them in a separate jira. +1 for the new patch.


 NameNode: implement handling of ACLs in combination with snapshots.
 ---

 Key: HDFS-5614
 URL: https://issues.apache.org/jira/browse/HDFS-5614
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: namenode
Affects Versions: HDFS ACLs (HDFS-4685)
Reporter: Chris Nauroth
Assignee: Chris Nauroth
 Attachments: HDFS-5614.1.patch, HDFS-5614.2.patch, HDFS-5614.3.patch


 Within a snapshot, all ACLs are frozen at the moment that the snapshot was 
 created.  ACL changes in the parent of the snapshot are not applied to the 
 snapshot.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Commented] (HDFS-5614) NameNode: implement handling of ACLs in combination with snapshots.

2014-01-31 Thread Chris Nauroth (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-5614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13888236#comment-13888236
 ] 

Chris Nauroth commented on HDFS-5614:
-

bq. Or we can pass in a Feature.class array here?

I actually had the same thought and tried that out before posting v3.  
Unfortunately, it has the same problem, because 
{{INodeWithAdditionalFields#getFeature}} is protected too.  It seems we have to 
widen visibility on some level to make this work.  This isn't on a 
client-facing boundary though, so at least it's all in code isolated to the 
NameNode.

Anyway, thank you for the excellent code review and for catching a few bugs.  
I'll commit v3.

 NameNode: implement handling of ACLs in combination with snapshots.
 ---

 Key: HDFS-5614
 URL: https://issues.apache.org/jira/browse/HDFS-5614
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: namenode
Affects Versions: HDFS ACLs (HDFS-4685)
Reporter: Chris Nauroth
Assignee: Chris Nauroth
 Attachments: HDFS-5614.1.patch, HDFS-5614.2.patch, HDFS-5614.3.patch


 Within a snapshot, all ACLs are frozen at the moment that the snapshot was 
 created.  ACL changes in the parent of the snapshot are not applied to the 
 snapshot.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Commented] (HDFS-5614) NameNode: implement handling of ACLs in combination with snapshots.

2014-01-30 Thread Chris Nauroth (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-5614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13886992#comment-13886992
 ] 

Chris Nauroth commented on HDFS-5614:
-

I've just noticed that my v1 patch here has introduced a bug.  If I 1) apply an 
ACL to a file, 2) remove that ACL, 3) save a new checkpoint, and 4) restart NN, 
I find that I can no longer add a new ACL to that file.  Somehow, the file has 
been left in a state where the ACL bit is off, but it has an {{AclFeature}}.  
Then, when I try to add an ACL again, it trips the {{IllegalStateException}} 
for trying to add multiple instances of {{AclFeature}} in 
{{INodeWithAdditionalFields#addAclFeature}}.

I'm going to track down this bug.  I suspect this patch will remain mostly the 
same, but I wanted to give potential code reviewers a heads-up that there will 
be a v2 patch coming.

 NameNode: implement handling of ACLs in combination with snapshots.
 ---

 Key: HDFS-5614
 URL: https://issues.apache.org/jira/browse/HDFS-5614
 Project: Hadoop HDFS
  Issue Type: Sub-task
  Components: namenode
Affects Versions: HDFS ACLs (HDFS-4685)
Reporter: Chris Nauroth
Assignee: Chris Nauroth
 Attachments: HDFS-5614.1.patch


 Within a snapshot, all ACLs are frozen at the moment that the snapshot was 
 created.  ACL changes in the parent of the snapshot are not applied to the 
 snapshot.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)