[
https://issues.apache.org/jira/browse/HADOOP-8934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13501575#comment-13501575
]
Daryn Sharp commented on HADOOP-8934:
-------------------------------------
I'm sorry for delay. I lost track of this jira... Comments:
* Let's leave {{PathData}} alone to make the patch have more brevity and to
prevent inconsistency. Another followup jira could switch all the commands to
use accessors rather than fields.
* I think the sort order isn't quite right, at least for size it looks
backwards from the real ls.
* Default sort should use {{PathData#compareTo}}.
* If you haven't already, ensure the patch hasn't broken any of the
{{TestHDFSCLI}} tests. You probably should add a few tests of your own. If
nothing else it's easier to visualize if a command and output are correct.
* Small nits regarding code guidelines:
** please use spaces in conditionals, ex. "if (blah)" instead of "if(blah)"
** cuddle the else clauses
** try to stay within 80 char lines
> Shell command ls should include sort options
> --------------------------------------------
>
> Key: HADOOP-8934
> URL: https://issues.apache.org/jira/browse/HADOOP-8934
> Project: Hadoop Common
> Issue Type: Improvement
> Components: fs
> Reporter: Jonathan Allen
> Assignee: Jonathan Allen
> Priority: Minor
> Attachments: HADOOP-8934.patch, HADOOP-8934.patch
>
>
> The shell command ls should include options to sort the output similar to the
> unix ls command. The following options seem appropriate:
> -t : sort by modification time
> -S : sort by file size
> -r : reverse the sort order
> -u : use access time rather than modification time for sort and display
--
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