Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-13844

Fix the fmt_bytes function in the dfs-dust.js

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.0, 2.2.0, 2.7.2, 3.0.0, 3.1.0
    • Fix Version/s: 2.10.0, 3.2.0, 2.9.2, 3.0.4, 3.1.2
    • Component/s: hdfs, ui
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The namenode WebUI cannot display the capacity with correct units. I have found that the function fmt_bytes in the dfs-dust.js missed the EB unit. This will lead to undefined unit in the ui.

      And although the unit ZB is very large, we should take the unit overflow into consideration. Supposing the last unit is GB, we should get the 8192 GB with the total capacity 8T rather than 8 undefined.

        Attachments

        1. undefined_unit.jpg
          418 kB
          yanghuafeng
        2. overflow_undefined_unit.jpg
          439 kB
          yanghuafeng
        3. overflow_unit.jpg
          400 kB
          yanghuafeng
        4. HDFS-13844.001.patch
          0.8 kB
          yanghuafeng

          Issue Links

            Activity

              People

              • Assignee:
                hfyang20071 yanghuafeng
                Reporter:
                hfyang20071 yanghuafeng
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: