Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-857

Incorrect type for fuse-dfs capacity can cause "df" to return negative values on 32-bit machines

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.21.0
    • Component/s: fuse-dfs
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Tags:
      fuse-dfs df hdfsGetCapacity

      Description

      On sufficiently large HDFS installs, the casting of hdfsGetCapacity to a long may cause "df" to return negative values. tOffset should be used instead.

      1. HDFS-857.patch
        0.5 kB
        Brian Bockelman

        Activity

        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #275 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/275/)

        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #275 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/275/ )
        Hide
        Hudson added a comment -

        Integrated in Hdfs-Patch-h5.grid.sp2.yahoo.net #302 (See http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/302/)

        Show
        Hudson added a comment - Integrated in Hdfs-Patch-h5.grid.sp2.yahoo.net #302 (See http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/302/ )
        Hide
        Hudson added a comment -

        Integrated in Hdfs-Patch-h2.grid.sp2.yahoo.net #146 (See http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/146/)

        Show
        Hudson added a comment - Integrated in Hdfs-Patch-h2.grid.sp2.yahoo.net #146 (See http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/146/ )
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #210 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk-Commit/210/)
        . Incorrect type for fuse-dfs capacity can cause "df" to return negative values on 32-bit machines. Contributed by Brian Bockelman.

        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #210 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk-Commit/210/ ) . Incorrect type for fuse-dfs capacity can cause "df" to return negative values on 32-bit machines. Contributed by Brian Bockelman.
        Hide
        Tom White added a comment -

        I've just committed this. Thanks Brian!

        (Test failures were unrelated.)

        Show
        Tom White added a comment - I've just committed this. Thanks Brian! (Test failures were unrelated.)
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12429028/HDFS-857.patch
        against trunk revision 899456.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/97/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/97/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/97/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/97/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12429028/HDFS-857.patch against trunk revision 899456. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/97/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/97/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/97/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/97/console This message is automatically generated.
        Hide
        Eli Collins added a comment -

        test-c++-libhdfs doesn't cover fuse so actually it shouldn't fail, TestFuseDFS would cover this though it's not currently running (HDFS-780). I tried this patch locally and it worked.

        Show
        Eli Collins added a comment - test-c++-libhdfs doesn't cover fuse so actually it shouldn't fail, TestFuseDFS would cover this though it's not currently running ( HDFS-780 ). I tried this patch locally and it worked.
        Hide
        Eli Collins added a comment -

        1 Patch looks good. Also passes test-c+-libhdfs.

        Show
        Eli Collins added a comment - 1 Patch looks good. Also passes test-c +-libhdfs.
        Hide
        Brian Bockelman added a comment -

        This patch fixes the issue by using tOffset instead of long.

        Show
        Brian Bockelman added a comment - This patch fixes the issue by using tOffset instead of long.

          People

          • Assignee:
            Brian Bockelman
            Reporter:
            Brian Bockelman
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development