Hadoop Common
  1. Hadoop Common
  2. HADOOP-9147

Add missing fields to FIleStatus.toString

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.0.2-alpha
    • Fix Version/s: 2.0.3-alpha, 0.23.7
    • Component/s: None
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Update FileStatus.toString to include missing fields

      Description

      The FileStatus.toString method is missing the following fields:

      • modification_time
      • access_time
      • symlink

      These should be added in to aid debugging.

      1. HADOOP-9147.patch
        11 kB
        Jonathan Allen
      2. HADOOP-9147.patch
        11 kB
        Jonathan Allen
      3. HADOOP-9147.patch
        10 kB
        Jonathan Allen
      4. HADOOP-9147.patch
        9 kB
        Suresh Srinivas

        Activity

        Jonathan Allen created issue -
        Hide
        Jonathan Allen added a comment -

        ready for code review

        Show
        Jonathan Allen added a comment - ready for code review
        Jonathan Allen made changes -
        Field Original Value New Value
        Attachment HADOOP-9147.patch [ 12561205 ]
        Jonathan Allen made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Release Note Update FileStatus.toString to include missing fields
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12561205/HADOOP-9147.patch
        against trunk revision .

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

        +1 tests included. The patch appears to include 1 new or modified test files.

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

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

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

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

        -1 core tests. The patch failed these unit tests in hadoop-common-project/hadoop-common:

        org.apache.hadoop.fs.TestFileStatus

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

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1890//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1890//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/12561205/HADOOP-9147.patch against trunk revision . +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. -1 core tests . The patch failed these unit tests in hadoop-common-project/hadoop-common: org.apache.hadoop.fs.TestFileStatus +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1890//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1890//console This message is automatically generated.
        Hide
        Jonathan Allen added a comment -

        failing test fixed

        Show
        Jonathan Allen added a comment - failing test fixed
        Jonathan Allen made changes -
        Attachment HADOOP-9147.patch [ 12561208 ]
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12561208/HADOOP-9147.patch
        against trunk revision .

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

        +1 tests included. The patch appears to include 1 new or modified test files.

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

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

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

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

        +1 core tests. The patch passed unit tests in hadoop-common-project/hadoop-common.

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

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1891//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1891//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/12561208/HADOOP-9147.patch against trunk revision . +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-common-project/hadoop-common. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1891//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1891//console This message is automatically generated.
        Hide
        Suresh Srinivas added a comment -

        Thanks for the patch.

        Comments:

        1. The toString tests should reuse code. You could have a method validateToString(FileStatus status) that could be used by all the variants of the methods that are testing toString()
        2. Similarly you can have a method for validateAccessors(FileStatus status, len, isDir, replication...) etc.
        3. Please keep your code consistent. If have a blank line before a method, do the same for other methods.
        4. Please add javadoc to every method with a brief description of what the test does.
        Show
        Suresh Srinivas added a comment - Thanks for the patch. Comments: The toString tests should reuse code. You could have a method validateToString(FileStatus status) that could be used by all the variants of the methods that are testing toString() Similarly you can have a method for validateAccessors(FileStatus status, len, isDir, replication...) etc. Please keep your code consistent. If have a blank line before a method, do the same for other methods. Please add javadoc to every method with a brief description of what the test does.
        Hide
        Jonathan Allen added a comment -

        actioned review comments

        Show
        Jonathan Allen added a comment - actioned review comments
        Jonathan Allen made changes -
        Attachment HADOOP-9147.patch [ 12561223 ]
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12561223/HADOOP-9147.patch
        against trunk revision .

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

        +1 tests included. The patch appears to include 1 new or modified test files.

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

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

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

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

        +1 core tests. The patch passed unit tests in hadoop-common-project/hadoop-common.

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

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1895//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1895//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/12561223/HADOOP-9147.patch against trunk revision . +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-common-project/hadoop-common. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1895//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1895//console This message is automatically generated.
        Aaron T. Myers made changes -
        Affects Version/s 2.0.2-alpha [ 12322473 ]
        Target Version/s 2.0.3-alpha [ 12323273 ]
        Hide
        Suresh Srinivas added a comment -

        I should have posted this comment earlier. There are number of fields defined with the same value in many of the methods. The patch can be much terser if we define them in a single place. Since I had not posted it earlier, here is an edit to the patch to address the missed comment. Let me know what you think.

        Show
        Suresh Srinivas added a comment - I should have posted this comment earlier. There are number of fields defined with the same value in many of the methods. The patch can be much terser if we define them in a single place. Since I had not posted it earlier, here is an edit to the patch to address the missed comment. Let me know what you think.
        Suresh Srinivas made changes -
        Attachment HADOOP-9147.patch [ 12561344 ]
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12561344/HADOOP-9147.patch
        against trunk revision .

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

        +1 tests included. The patch appears to include 1 new or modified test files.

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

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

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

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

        +1 core tests. The patch passed unit tests in hadoop-common-project/hadoop-common.

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

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1901//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1901//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/12561344/HADOOP-9147.patch against trunk revision . +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-common-project/hadoop-common. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1901//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1901//console This message is automatically generated.
        Hide
        Jonathan Allen added a comment -

        Suresh - that looks good to me

        Show
        Jonathan Allen added a comment - Suresh - that looks good to me
        Hide
        Suresh Srinivas added a comment -

        I committed the patch to trunk. Thank you Jonathan.

        Show
        Suresh Srinivas added a comment - I committed the patch to trunk. Thank you Jonathan.
        Suresh Srinivas made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ]
        Fix Version/s 3.0.0 [ 12320357 ]
        Resolution Fixed [ 1 ]
        Hide
        Hudson added a comment -

        Integrated in Hadoop-trunk-Commit #3134 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3134/)
        HADOOP-9147. Add missing fields to FIleStatus.toString. Contributed by Jonathan Allen. (Revision 1423444)

        Result = SUCCESS
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1423444
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java
        Show
        Hudson added a comment - Integrated in Hadoop-trunk-Commit #3134 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3134/ ) HADOOP-9147 . Add missing fields to FIleStatus.toString. Contributed by Jonathan Allen. (Revision 1423444) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1423444 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java
        Suresh Srinivas made changes -
        Fix Version/s 2.0.3-alpha [ 12323273 ]
        Fix Version/s 3.0.0 [ 12320357 ]
        Hide
        Suresh Srinivas added a comment -

        Committed the patch to branch-2 as well.

        Show
        Suresh Srinivas added a comment - Committed the patch to branch-2 as well.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-trunk-Commit #3135 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3135/)
        Moved HADOOP-9147 to release 2.0.3-alpha section (Revision 1423451)

        Result = SUCCESS
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1423451
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-trunk-Commit #3135 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3135/ ) Moved HADOOP-9147 to release 2.0.3-alpha section (Revision 1423451) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1423451 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Yarn-trunk #70 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/70/)
        Moved HADOOP-9147 to release 2.0.3-alpha section (Revision 1423451)
        HADOOP-9147. Add missing fields to FIleStatus.toString. Contributed by Jonathan Allen. (Revision 1423444)

        Result = SUCCESS
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1423451
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt

        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1423444
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java
        Show
        Hudson added a comment - Integrated in Hadoop-Yarn-trunk #70 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/70/ ) Moved HADOOP-9147 to release 2.0.3-alpha section (Revision 1423451) HADOOP-9147 . Add missing fields to FIleStatus.toString. Contributed by Jonathan Allen. (Revision 1423444) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1423451 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1423444 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #1259 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1259/)
        Moved HADOOP-9147 to release 2.0.3-alpha section (Revision 1423451)
        HADOOP-9147. Add missing fields to FIleStatus.toString. Contributed by Jonathan Allen. (Revision 1423444)

        Result = FAILURE
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1423451
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt

        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1423444
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1259 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1259/ ) Moved HADOOP-9147 to release 2.0.3-alpha section (Revision 1423451) HADOOP-9147 . Add missing fields to FIleStatus.toString. Contributed by Jonathan Allen. (Revision 1423444) Result = FAILURE suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1423451 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1423444 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #1290 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1290/)
        Moved HADOOP-9147 to release 2.0.3-alpha section (Revision 1423451)
        HADOOP-9147. Add missing fields to FIleStatus.toString. Contributed by Jonathan Allen. (Revision 1423444)

        Result = SUCCESS
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1423451
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt

        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1423444
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1290 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1290/ ) Moved HADOOP-9147 to release 2.0.3-alpha section (Revision 1423451) HADOOP-9147 . Add missing fields to FIleStatus.toString. Contributed by Jonathan Allen. (Revision 1423444) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1423451 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1423444 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java
        Thomas Graves made changes -
        Fix Version/s 0.23.7 [ 12323956 ]
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-0.23-Build #498 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/498/)
        HADOOP-9147. Add missing fields to FIleStatus.toString.(Jonathan Allen via suresh) (Revision 1434853)

        Result = FAILURE
        tgraves : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1434853
        Files :

        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-0.23-Build #498 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/498/ ) HADOOP-9147 . Add missing fields to FIleStatus.toString.(Jonathan Allen via suresh) (Revision 1434853) Result = FAILURE tgraves : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1434853 Files : /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileStatus.java
        Arun C Murthy made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        1h 20m 1 Jonathan Allen 16/Dec/12 19:49
        Patch Available Patch Available Resolved Resolved
        1d 18h 35m 1 Suresh Srinivas 18/Dec/12 14:24
        Resolved Resolved Closed Closed
        58d 22h 48m 1 Arun C Murthy 15/Feb/13 13:12

          People

          • Assignee:
            Jonathan Allen
            Reporter:
            Jonathan Allen
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development