[ https://issues.apache.org/jira/browse/HDFS-13250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16407397#comment-16407397 ]
Yiqun Lin edited comment on HDFS-13250 at 3/21/18 3:25 AM: ----------------------------------------------------------- [~elgoiri], just have one comment for this place: {code:java} + /** + * Get the permissions for the parent of a child with given permissions. If + * the child has r--, we will set it to r-x. + * @param mask The permission mask of the child. + * @return The permission mask of the parent. + */ + private static FsPermission getParentPermission(final FsPermission mask) { + FsPermission ret = new FsPermission( + applyExecute(mask.getUserAction()), + applyExecute(mask.getGroupAction()), + applyExecute(mask.getOtherAction())); + return ret; + } {code} When prepare to get parent permission, why not use the consistent way as that in {{FSNamesystem}}, like this: *FSDirMkdirOp.java* {code:java} private static PermissionStatus addImplicitUwx(PermissionStatus parentPerm, PermissionStatus perm) { FsPermission p = parentPerm.getPermission(); FsPermission ancestorPerm = new FsPermission( p.getUserAction().or(FsAction.WRITE_EXECUTE), p.getGroupAction(), p.getOtherAction()); return new PermissionStatus(perm.getUserName(), perm.getGroupName(), ancestorPerm); } {code} But this won't affect the process of commit, I'd like to commit this shortly. We can take a further look in follow-up JIRAs. was (Author: linyiqun): [~elgoiri], just have one comment for this place: {code:java} + /** + * Get the permissions for the parent of a child with given permissions. If + * the child has r--, we will set it to r-x. + * @param mask The permission mask of the child. + * @return The permission mask of the parent. + */ + private static FsPermission getParentPermission(final FsPermission mask) { + FsPermission ret = new FsPermission( + applyExecute(mask.getUserAction()), + applyExecute(mask.getGroupAction()), + applyExecute(mask.getOtherAction())); + return ret; + } {code} When prepare to get parent permission, why not use the consistent way as that in {{FSNamesystem}}, like this: *FSDirMkdirOp.java* {code:java} private static PermissionStatus addImplicitUwx(PermissionStatus parentPerm, PermissionStatus perm) { FsPermission p = parentPerm.getPermission(); FsPermission ancestorPerm = new FsPermission( p.getUserAction().or(FsAction.WRITE_EXECUTE), p.getGroupAction(), p.getOtherAction()); return new PermissionStatus(perm.getUserName(), perm.getGroupName(), ancestorPerm); } {code} > RBF: Router to manage requests across multiple subclusters > ---------------------------------------------------------- > > Key: HDFS-13250 > URL: https://issues.apache.org/jira/browse/HDFS-13250 > Project: Hadoop HDFS > Issue Type: Sub-task > Reporter: Íñigo Goiri > Assignee: Íñigo Goiri > Priority: Major > Attachments: HDFS-13250.000.patch, HDFS-13250.001.patch, > HDFS-13250.002.patch, HDFS-13250.003.patch, HDFS-13250.004.patch, > HDFS-13250.005.patch > > > HDFS-13124 introduces the concept of mount points spanning multiple > subclusters. The Router should distribute the requests across these > subclusters. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org