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

Uma Maheswara Rao G commented on HADOOP-7210:
---------------------------------------------

Hi Daryn,
Thanks for your comments.
I agree with you. But I have one suggestion. We can directly override the run 
method in Chown and Chgrp directly from CmdHandler. Currently the ChgrpHandler 
extends the ChownHandler thereby use the same run method.  This might have been 
done to save some lines of code. But because of this, we are providing 
additional constructor and additional if checks in the code.

        For example, owner details check is not applicable for chgrp command. 
The owner will be always null, still we will execute the owner checks for 
ChgrepHandler also.

{code}
  String newOwner = (owner == null || owner.equals(file.getOwner())) ?
                        null : owner;
  ....
  ....
  if (newOwner != null || newGroup != null) {
{code}

Instead of this, Both Chown and Chgrp handlers can directly extend from 
CmdHandler provide the run method. 

Please tell me your suggestion on this.


> Chown command is not working from FSShell.
> ------------------------------------------
>
>                 Key: HADOOP-7210
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7210
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>         Environment: Linux
>            Reporter: Uma Maheswara Rao G
>            Assignee: Uma Maheswara Rao G
>         Attachments: HADOOP-7210.patch
>
>
> chown command is not invoking the setOwner on FileSystem.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to