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

Capacity reporting incorrect on Solaris

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 0.20.1
    • None
    • fs
    • None

    Description

      When trying to get Hadoop up and running on Solaris on a ZFS filesystem, I encountered a problem where the capacity reported was zero:

      Configured Capacity: 0 (0 KB)

      It looks like the problem is with the 'df' output:

      $ df -k /data/hadoop
      Filesystem 1024-blocks Used Available Capacity Mounted on
      / 0 7186354 20490274 26% /

      The following patch (applied to trunk) fixes the problem. Though the real problem is with 'df', I suspect the patch is harmless enough to include?

      Index: src/java/org/apache/hadoop/fs/DF.java
      ===================================================================
      — src/java/org/apache/hadoop/fs/DF.java (revision 826471)
      +++ src/java/org/apache/hadoop/fs/DF.java (working copy)
      @@ -181,7 +181,11 @@
      this.percentUsed = Integer.parseInt(tokens.nextToken());
      this.mount = tokens.nextToken();
      break;

      • }
        + }
        +
        + if (this.capacity == 0)
        + this.capacity = this.used + this.available;
        +
        }

      public static void main(String[] args) throws Exception {

      Attachments

        1. solaris-hadoop.patch
          0.5 kB
          Doug Judd

        Activity

          People

            Unassigned Unassigned
            nuggetwheat Doug Judd
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: