You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Brahma Reddy Battula (JIRA)" <ji...@apache.org> on 2015/04/28 04:51:06 UTC
[jira] [Updated] (HADOOP-10724) `hadoop fs -du -h` incorrectly
formatted
[ https://issues.apache.org/jira/browse/HADOOP-10724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brahma Reddy Battula updated HADOOP-10724:
------------------------------------------
Assignee: Sam Steingold (was: Brahma Reddy Battula)
> `hadoop fs -du -h` incorrectly formatted
> ----------------------------------------
>
> Key: HADOOP-10724
> URL: https://issues.apache.org/jira/browse/HADOOP-10724
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Sam Steingold
> Assignee: Sam Steingold
>
> {{hadoop fs -du -h}} prints sizes with a space between the number and the unit:
> {code}
> $ hadoop fs -du -h .....
> 91.7 G ....
> 583.1 M ....
> 97.6 K .....
> {code}
> The standard unix {{du -h}} does not:
> {code}
> $ du -h
> 400K ...
> 404K ....
> 480K .....
> {code}
> the result is that the output of {{du -h}} is properly sorted by {{sort -h}} while the output of {{hadoop fs -du -h}} is *not* properly sorted by it.
> Please see
> * [sort|http://linux.die.net/man/1/sort]: "-h --human-numeric-sort
> compare human readable numbers (e.g., 2K 1G) "
> * [du|http://linux.die.net/man/1/du]: "-h, --human-readable
> print sizes in human readable format (e.g., 1K 234M 2G) "
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)