[
https://issues.apache.org/jira/browse/HDFS-14210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16763143#comment-16763143
]
Ayush Saxena commented on HDFS-14210:
-------------------------------------
{quote}Anyway, my proposal is to split MountTable#isPathAll() into
MountTable#isDirectoryAll() and MountTable#isFileAll().
{quote}
If I am catching up correct. I guess in the invokeAll scenario. We may just
need an extra check that src is a mount entry or not. With isPathAll() and if
src is mount entry than invokeConcurrent or else invokeSequential. I guess this
might work. Because for HASH only there would be multiple dest only for when we
call up on mount else it shall be always one. If we are working through router
only.
Might be something like this ::
{code:java}
/**
* Check if path is a mount entry.
* @param path
* @return true if path is a mount entry.
* @throws IOException
*/
private boolean isMountEntry(final String path) throws IOException {
if (subclusterResolver instanceof MountTableResolver) {
return ((MountTableResolver) subclusterResolver).getMountPoints("/")
.contains(path);
}
return false;
}
public void setOwner(String src, String username, String groupname)
throws IOException {
rpcServer.checkOperation(NameNode.OperationCategory.WRITE);
final List<RemoteLocation> locations =
rpcServer.getLocationsForPath(src, true);
RemoteMethod method = new RemoteMethod("setOwner",
new Class<?>[] { String.class, String.class, String.class },
new RemoteParam(), username, groupname);
if (isPathAll(src) || isMountEntry(src)) {
rpcClient.invokeConcurrent(locations, method);
} else {
rpcClient.invokeSequential(locations, method);
}
}
{code}
[~elgoiri] Pls give a check if that sounds good or still missing part. I think
the inconsistancy that I was catching up was only when we are calling the
setters on mount only.
> RBF: ModifyACL should work over all the destinations
> ----------------------------------------------------
>
> Key: HDFS-14210
> URL: https://issues.apache.org/jira/browse/HDFS-14210
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Shubham Dewan
> Assignee: Shubham Dewan
> Priority: Major
> Attachments: HDFS-14210-HDFS-13891.002.patch,
> HDFS-14210-HDFS-13891.003.patch, HDFS-14210.001.patch
>
>
> 1) A mount point with multiple destinations.
> 2) ./bin/hdfs dfs -setfacl -m user:abc:rwx /testacl
> 3) where /testacl => /test1, /test2
> 4) command works for only one destination.
> ACL should be set on both of the destinations.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]