[ 
https://issues.apache.org/jira/browse/HADOOP-1298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493542
 ] 

Tom White commented on HADOOP-1298:
-----------------------------------

Point 2. could also been done with enums in a more typesafe manner with 
something like

public enum Permission {
  OWNER_READ,
  OWNER_WRITE,
  GROUP_READ,
  GROUP_WRITE,
  OTHER_READ,
  OTHER_WRITE
}

FileStatus status = new FileStatus(Path, user, group, 
EnumSet.allOf(Permission.class);
FileStatus status = new FileStatus(Path, user, group, EnumSet.of(OWNER_READ, 
OWNER_WRITE, GROUP_READ));

We could also define constants for OWNER_RW etc and PERMIT_ALL as EnumSets if 
desired.

> adding user info to file
> ------------------------
>
>                 Key: HADOOP-1298
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1298
>             Project: Hadoop
>          Issue Type: New Feature
>          Components: dfs, fs
>            Reporter: Kurtis Heimerl
>         Attachments: hadoop-user-munncha.patch, hadoop-user-munncha.patch, 
> hadoop-user-munncha.patch, hadoop-user-munncha.patch4, 
> hadoop-user-munncha.patch5, hadoop-user-munncha.patch6, 
> hadoop-user-munncha.patch7
>
>
> I'm working on adding a permissions model to hadoop's DFS. The first step is 
> this change, which associates user info with files. Following this I'll 
> assoicate permissions info, then block methods based on that user info, then 
> authorization of the user info. 
> So, right now i've implemented adding user info to files. I'm looking for 
> feedback before I clean this up and make it offical. 
> I wasn't sure what release, i'm working off trunk. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to