Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-5863 Improve OfflineImageViewer
  3. HDFS-5956

A file size is multiplied by the replication factor in 'hdfs oiv -p FileDistribution' option

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.0, 3.0.0-alpha1
    • Fix Version/s: 2.4.0
    • Component/s: tools
    • Labels:
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      In FileDistributionCalculator.java,

              long fileSize = 0;
              for (BlockProto b : f.getBlocksList()) {
                fileSize += b.getNumBytes() * f.getReplication();
              }
              maxFileSize = Math.max(fileSize, maxFileSize);
              totalSpace += fileSize;
      

      should be

              long fileSize = 0;
              for (BlockProto b : f.getBlocksList()) {
                fileSize += b.getNumBytes();
              }
              maxFileSize = Math.max(fileSize, maxFileSize);
              totalSpace += fileSize * f.getReplication();
      

        Attachments

        1. HDFS-5956.2.patch
          5 kB
          Akira Ajisaka
        2. HDFS-5956.3.patch
          4 kB
          Akira Ajisaka
        3. HDFS-5956.patch
          4 kB
          Akira Ajisaka

          Issue Links

            Activity

              People

              • Assignee:
                aajisaka Akira Ajisaka
                Reporter:
                aajisaka Akira Ajisaka
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: