Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-10724

`hadoop fs -du -h` incorrectly formatted

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0.0-alpha1
    • None
    • fs
    • None
    • Incompatible change

    Description

      hadoop fs -du -h prints sizes with a space between the number and the unit:

      $ hadoop fs -du -h ..... 
      91.7 G   ....
      583.1 M  ....
      97.6 K   .....
      

      The standard unix du -h does not:

      $ du -h
      400K    ...
      404K    ....
      480K    .....
      

      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: "-h --human-numeric-sort
        compare human readable numbers (e.g., 2K 1G) "
      • du: "-h, --human-readable
        print sizes in human readable format (e.g., 1K 234M 2G) "

      Attachments

        Activity

          People

            sds Sam Steingold
            sds Sam Steingold
            Votes:
            4 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated: