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
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Update FileStatus.toString to include missing fields
    • Target Version/s:

      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
        9 kB
        Suresh Srinivas
      2. HADOOP-9147.patch
        10 kB
        Jonathan Allen
      3. HADOOP-9147.patch
        11 kB
        Jonathan Allen
      4. HADOOP-9147.patch
        11 kB
        Jonathan Allen

        Activity

        Hide
        Jonathan Allen added a comment -

        ready for code review

        Show
        Jonathan Allen added a comment - ready for code review
        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
        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
        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.
        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.
        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.
        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
        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
        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

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development