[
https://issues.apache.org/jira/browse/HADOOP-8763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13457240#comment-13457240
]
Chuan Liu commented on HADOOP-8763:
-----------------------------------
>The following code seems to be an unrelated change? Also, do you mean BUILDIN
>or BUILTIN?
You are right. It should be BUILTIN. This code is relevant in the sense it
makes the function less prone to potential errors, which is used by 'winutils
chown'.
>Do you see any unexpected behavior for users because of the following?
No. I did not see any unexpected behavior. This is just for future references.
>We can just leave around the public constant Shell.SET_GROUP_COMMAND or
>deprecate it. I am okay leaving it around.
I have left out this in new patch.
>Not sure of your usage of asserts vs exit-code, but in src/winutils/chown.c,
>instead of asserts for zero-length string, we should log a msg to stderr and
>return an EXIT_FAILURE? Also, if both are empty also you should return
>EXIT_FAILURE?
The assertions assert for previous parsing code. The parsing code will not
initiate and allocate memory for 'userName' and 'groupName' of zero-length,
i.e. 'userName' and 'groupName' are initiated or NULL in such cases. We should
not return error in such cases because 'chown : file' is a correct usage here,
though no user name or group name is given.
>This code won't be invoked on linux, because, ahm, this is winutils? In any
>case, that is not behaviour I know, a "chown user: filename" shouldn't change
>the group-name
I have tested the Linux behaviors. You can also check out the man page of
'chown': http://linux.die.net/man/1/chown
Again, as my answer to Bikas's question, this usage pattern is not found in
Hadoop on Linux or Windows that I am aware of. I think it is good to document
the difference here for future reference.
> Set group owner on Windows failed
> ---------------------------------
>
> Key: HADOOP-8763
> URL: https://issues.apache.org/jira/browse/HADOOP-8763
> Project: Hadoop Common
> Issue Type: Bug
> Reporter: Chuan Liu
> Assignee: Chuan Liu
> Priority: Minor
> Fix For: 1-win
>
> Attachments: HADOOP-8763-branch-1-win-2.patch,
> HADOOP-8763-branch-1-win.patch
>
>
> RawLocalFileSystem.setOwner() method may incorrectly set the group owner of a
> file on Windows.
> Specifically the following function in RawLocalFileSystem class will fail on
> Windows when username is null, i.e. only set group ownership.
> {code}
> public void setOwner(Path p, String username, String groupname)
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira