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

FileSystem#getUsed() returns the file length only from root '/'

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.0
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      getUsed should return total HDFS used, compared to getStatus.getUsed

        Issue Links

          Activity

          Hide
          andreina J.Andreina added a comment -

          FileSystem#getUsed() is intended to return the total file size in the filesystem .
          But it returns only the total size of files under root ("/") (File size under sub-folder is not calculated).

          Attaching patch for the same.
          Please review.

          Show
          andreina J.Andreina added a comment - FileSystem#getUsed() is intended to return the total file size in the filesystem . But it returns only the total size of files under root ("/") (File size under sub-folder is not calculated). Attaching patch for the same. Please review.
          Hide
          hadoopqa Hadoop QA added a comment -



          +1 overall



          Vote Subsystem Runtime Comment
          0 pre-patch 19m 36s Pre-patch trunk compilation is healthy.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 tests included 0m 0s The patch appears to include 1 new or modified test files.
          +1 javac 7m 30s There were no new javac warning messages.
          +1 javadoc 9m 39s There were no new javadoc warning messages.
          +1 release audit 0m 23s The applied patch does not increase the total number of release audit warnings.
          +1 checkstyle 3m 16s There were no new checkstyle issues.
          +1 whitespace 0m 0s The patch has no lines that end in whitespace.
          +1 install 1m 34s mvn install still works.
          +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse.
          +1 findbugs 5m 3s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
          +1 common tests 22m 43s Tests passed in hadoop-common.
          +1 hdfs tests 160m 31s Tests passed in hadoop-hdfs.
              230m 50s  



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12737935/HDFS-8525.1.patch
          Optional Tests javadoc javac unit findbugs checkstyle
          git revision trunk / 790a861
          hadoop-common test log https://builds.apache.org/job/PreCommit-HDFS-Build/11241/artifact/patchprocess/testrun_hadoop-common.txt
          hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/11241/artifact/patchprocess/testrun_hadoop-hdfs.txt
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/11241/testReport/
          Java 1.7.0_55
          uname Linux asf903.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/11241/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 pre-patch 19m 36s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. +1 tests included 0m 0s The patch appears to include 1 new or modified test files. +1 javac 7m 30s There were no new javac warning messages. +1 javadoc 9m 39s There were no new javadoc warning messages. +1 release audit 0m 23s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 3m 16s There were no new checkstyle issues. +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 1m 34s mvn install still works. +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse. +1 findbugs 5m 3s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 common tests 22m 43s Tests passed in hadoop-common. +1 hdfs tests 160m 31s Tests passed in hadoop-hdfs.     230m 50s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12737935/HDFS-8525.1.patch Optional Tests javadoc javac unit findbugs checkstyle git revision trunk / 790a861 hadoop-common test log https://builds.apache.org/job/PreCommit-HDFS-Build/11241/artifact/patchprocess/testrun_hadoop-common.txt hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/11241/artifact/patchprocess/testrun_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/11241/testReport/ Java 1.7.0_55 uname Linux asf903.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-HDFS-Build/11241/console This message was automatically generated.
          Hide
          vinayrpet Vinayakumar B added a comment -

          +1, patch looks good.
          Will commit shortly

          Show
          vinayrpet Vinayakumar B added a comment - +1, patch looks good. Will commit shortly
          Hide
          vinayrpet Vinayakumar B added a comment -

          Moving to Common, since changes are only in common module.

          Show
          vinayrpet Vinayakumar B added a comment - Moving to Common, since changes are only in common module.
          Hide
          vinayrpet Vinayakumar B added a comment -

          Committed to trunk and branch-2.
          Thanks tongshiquan for reporting.
          Thanks J.Andreina for the contribution.

          Show
          vinayrpet Vinayakumar B added a comment - Committed to trunk and branch-2. Thanks tongshiquan for reporting. Thanks J.Andreina for the contribution.
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-trunk-Commit #8092 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8092/)
          HADOOP-12154. FileSystem#getUsed() returns the file length only from root '/' (Contributed by J.Andreina) (vinayakumarb: rev 6d99017f38f5a158b5cb65c74688b4c833e4e35f)

          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #8092 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8092/ ) HADOOP-12154 . FileSystem#getUsed() returns the file length only from root '/' (Contributed by J.Andreina) (vinayakumarb: rev 6d99017f38f5a158b5cb65c74688b4c833e4e35f) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Mapreduce-trunk-Java8 #242 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/242/)
          HADOOP-12154. FileSystem#getUsed() returns the file length only from root '/' (Contributed by J.Andreina) (vinayakumarb: rev 6d99017f38f5a158b5cb65c74688b4c833e4e35f)

          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Mapreduce-trunk-Java8 #242 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/242/ ) HADOOP-12154 . FileSystem#getUsed() returns the file length only from root '/' (Contributed by J.Andreina) (vinayakumarb: rev 6d99017f38f5a158b5cb65c74688b4c833e4e35f) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Mapreduce-trunk #2190 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2190/)
          HADOOP-12154. FileSystem#getUsed() returns the file length only from root '/' (Contributed by J.Andreina) (vinayakumarb: rev 6d99017f38f5a158b5cb65c74688b4c833e4e35f)

          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Mapreduce-trunk #2190 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2190/ ) HADOOP-12154 . FileSystem#getUsed() returns the file length only from root '/' (Contributed by J.Andreina) (vinayakumarb: rev 6d99017f38f5a158b5cb65c74688b4c833e4e35f) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk #2172 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2172/)
          HADOOP-12154. FileSystem#getUsed() returns the file length only from root '/' (Contributed by J.Andreina) (vinayakumarb: rev 6d99017f38f5a158b5cb65c74688b4c833e4e35f)

          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2172 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2172/ ) HADOOP-12154 . FileSystem#getUsed() returns the file length only from root '/' (Contributed by J.Andreina) (vinayakumarb: rev 6d99017f38f5a158b5cb65c74688b4c833e4e35f) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java hadoop-common-project/hadoop-common/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #233 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/233/)
          HADOOP-12154. FileSystem#getUsed() returns the file length only from root '/' (Contributed by J.Andreina) (vinayakumarb: rev 6d99017f38f5a158b5cb65c74688b4c833e4e35f)

          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #233 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/233/ ) HADOOP-12154 . FileSystem#getUsed() returns the file length only from root '/' (Contributed by J.Andreina) (vinayakumarb: rev 6d99017f38f5a158b5cb65c74688b4c833e4e35f) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java

            People

            • Assignee:
              andreina J.Andreina
              Reporter:
              tongshiquan tongshiquan
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development