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

Trash messages should be handled by Logger instead of being delivered on System.out

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: trash
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Incompatible change, Reviewed
    • Release Note:
      Now trash message is not printed to System.out. It is handled by Logger instead.

      Description

      Specifically,

        if (success) {
            System.out.println("Moved: '" + p + "' to trash at: " +
                trash.getCurrentTrashDir() );
          }
      

      should be:

        if (success) {
            LOG.info("Moved: '" + p + "' to trash at: " + trash.getCurrentTrashDir());
          }
      
      1. HDFS-9037.000.patch
        0.8 kB
        Mingliang Liu

        Issue Links

          Activity

          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #377 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/377/)
          HADOOP-12416. Trash messages should be handled by Logger instead of being delivered on System.out. Contributed by Mingliang Liu. (aajisaka: rev 77aaf4cf7dd344eb094d9c079e5fb993c6696ebf)

          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Trash.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #377 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/377/ ) HADOOP-12416 . Trash messages should be handled by Logger instead of being delivered on System.out. Contributed by Mingliang Liu. (aajisaka: rev 77aaf4cf7dd344eb094d9c079e5fb993c6696ebf) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Trash.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk #2316 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2316/)
          HADOOP-12416. Trash messages should be handled by Logger instead of being delivered on System.out. Contributed by Mingliang Liu. (aajisaka: rev 77aaf4cf7dd344eb094d9c079e5fb993c6696ebf)

          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Trash.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2316 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2316/ ) HADOOP-12416 . Trash messages should be handled by Logger instead of being delivered on System.out. Contributed by Mingliang Liu. (aajisaka: rev 77aaf4cf7dd344eb094d9c079e5fb993c6696ebf) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Trash.java hadoop-common-project/hadoop-common/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk #2340 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2340/)
          HADOOP-12416. Trash messages should be handled by Logger instead of being delivered on System.out. Contributed by Mingliang Liu. (aajisaka: rev 77aaf4cf7dd344eb094d9c079e5fb993c6696ebf)

          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Trash.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2340 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2340/ ) HADOOP-12416 . Trash messages should be handled by Logger instead of being delivered on System.out. Contributed by Mingliang Liu. (aajisaka: rev 77aaf4cf7dd344eb094d9c079e5fb993c6696ebf) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Trash.java hadoop-common-project/hadoop-common/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk #1134 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1134/)
          HADOOP-12416. Trash messages should be handled by Logger instead of being delivered on System.out. Contributed by Mingliang Liu. (aajisaka: rev 77aaf4cf7dd344eb094d9c079e5fb993c6696ebf)

          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Trash.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #1134 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1134/ ) HADOOP-12416 . Trash messages should be handled by Logger instead of being delivered on System.out. Contributed by Mingliang Liu. (aajisaka: rev 77aaf4cf7dd344eb094d9c079e5fb993c6696ebf) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Trash.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #394 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/394/)
          HADOOP-12416. Trash messages should be handled by Logger instead of being delivered on System.out. Contributed by Mingliang Liu. (aajisaka: rev 77aaf4cf7dd344eb094d9c079e5fb993c6696ebf)

          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Trash.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #394 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/394/ ) HADOOP-12416 . Trash messages should be handled by Logger instead of being delivered on System.out. Contributed by Mingliang Liu. (aajisaka: rev 77aaf4cf7dd344eb094d9c079e5fb993c6696ebf) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Trash.java hadoop-common-project/hadoop-common/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Yarn-trunk-Java8 #400 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/400/)
          HADOOP-12416. Trash messages should be handled by Logger instead of being delivered on System.out. Contributed by Mingliang Liu. (aajisaka: rev 77aaf4cf7dd344eb094d9c079e5fb993c6696ebf)

          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Trash.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk-Java8 #400 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/400/ ) HADOOP-12416 . Trash messages should be handled by Logger instead of being delivered on System.out. Contributed by Mingliang Liu. (aajisaka: rev 77aaf4cf7dd344eb094d9c079e5fb993c6696ebf) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Trash.java hadoop-common-project/hadoop-common/CHANGES.txt
          Hide
          hadoopqa Hadoop QA added a comment -



          -1 overall



          Vote Subsystem Runtime Comment
          0 pre-patch 20m 37s 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 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 javac 9m 31s There were no new javac warning messages.
          +1 javadoc 12m 12s There were no new javadoc warning messages.
          +1 release audit 0m 26s The applied patch does not increase the total number of release audit warnings.
          +1 checkstyle 1m 19s There were no new checkstyle issues.
          +1 whitespace 0m 0s The patch has no lines that end in whitespace.
          +1 install 1m 28s mvn install still works.
          +1 eclipse:eclipse 0m 33s The patch built with eclipse:eclipse.
          +1 findbugs 1m 54s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
          +1 common tests 23m 48s Tests passed in hadoop-common.
              71m 55s  



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12754744/HDFS-9037.000.patch
          Optional Tests javadoc javac unit findbugs checkstyle
          git revision trunk / 6c52be7
          hadoop-common test log https://builds.apache.org/job/PreCommit-HADOOP-Build/7666/artifact/patchprocess/testrun_hadoop-common.txt
          Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/7666/testReport/
          Java 1.7.0_55
          uname Linux asf907.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-HADOOP-Build/7666/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 20m 37s 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 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 javac 9m 31s There were no new javac warning messages. +1 javadoc 12m 12s There were no new javadoc warning messages. +1 release audit 0m 26s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 1m 19s There were no new checkstyle issues. +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 1m 28s mvn install still works. +1 eclipse:eclipse 0m 33s The patch built with eclipse:eclipse. +1 findbugs 1m 54s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 common tests 23m 48s Tests passed in hadoop-common.     71m 55s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12754744/HDFS-9037.000.patch Optional Tests javadoc javac unit findbugs checkstyle git revision trunk / 6c52be7 hadoop-common test log https://builds.apache.org/job/PreCommit-HADOOP-Build/7666/artifact/patchprocess/testrun_hadoop-common.txt Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/7666/testReport/ Java 1.7.0_55 uname Linux asf907.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-HADOOP-Build/7666/console This message was automatically generated.
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-trunk-Commit #8462 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8462/)
          HADOOP-12416. Trash messages should be handled by Logger instead of being delivered on System.out. Contributed by Mingliang Liu. (aajisaka: rev 77aaf4cf7dd344eb094d9c079e5fb993c6696ebf)

          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Trash.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #8462 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8462/ ) HADOOP-12416 . Trash messages should be handled by Logger instead of being delivered on System.out. Contributed by Mingliang Liu. (aajisaka: rev 77aaf4cf7dd344eb094d9c079e5fb993c6696ebf) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Trash.java hadoop-common-project/hadoop-common/CHANGES.txt
          Hide
          liuml07 Mingliang Liu added a comment -

          Thank you Akira Ajisaka for reviewing and committing this patch.

          Show
          liuml07 Mingliang Liu added a comment - Thank you Akira Ajisaka for reviewing and committing this patch.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          s/to this/this/g

          Show
          ajisakaa Akira Ajisaka added a comment - s/to this/this/g
          Hide
          ajisakaa Akira Ajisaka added a comment -

          Committed to this to trunk and branch-2. Thanks Mingliang Liu for the contribution.

          Show
          ajisakaa Akira Ajisaka added a comment - Committed to this to trunk and branch-2. Thanks Mingliang Liu for the contribution.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          Moved to Hadoop common as the change is in hadoop-common module.

          Show
          ajisakaa Akira Ajisaka added a comment - Moved to Hadoop common as the change is in hadoop-common module.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          I'll commit this to trunk and branch-2 in Sep. 16 if there are no additional comments.

          Show
          ajisakaa Akira Ajisaka added a comment - I'll commit this to trunk and branch-2 in Sep. 16 if there are no additional comments.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          Thanks Ashutosh Chauhan and Haohui Mai for the comments.

          Why this is an incompatible change?

          Changing the path of a command, removing or renaming command line options, the order of arguments, or the command return code and output break compatibility and may adversely affect users. (http://hadoop.apache.org/docs/r2.7.1/hadoop-project-dist/hadoop-common/Compatibility.html#Command_Line_Interface_CLI)
          I'm thinking this message may be treated as 'output' (not log) since it is delivered on System.out.

          Show
          ajisakaa Akira Ajisaka added a comment - Thanks Ashutosh Chauhan and Haohui Mai for the comments. Why this is an incompatible change? Changing the path of a command, removing or renaming command line options, the order of arguments, or the command return code and output break compatibility and may adversely affect users. ( http://hadoop.apache.org/docs/r2.7.1/hadoop-project-dist/hadoop-common/Compatibility.html#Command_Line_Interface_CLI ) I'm thinking this message may be treated as 'output' (not log) since it is delivered on System.out.
          Hide
          wheat9 Haohui Mai added a comment -

          Why this is an incompatible change?

          Show
          wheat9 Haohui Mai added a comment - Why this is an incompatible change?
          Hide
          ashutoshc Ashutosh Chauhan added a comment -

          From Hive's perspective, its super useful to commit this to branch-2, because we are not moving to trunk any time soon.

          Show
          ashutoshc Ashutosh Chauhan added a comment - From Hive's perspective, its super useful to commit this to branch-2, because we are not moving to trunk any time soon.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          We need to decide what branches to commit.

          • This patch will change the output of CLI command, so I'm thinking this is an incompatible change.
          • In hadoop-1, rm command does not print messages to System.out, but it does print it to System.out in branch-2. Therefore, there is a long-term regression in hive silent mode as I mentioned before.

          Now I'm thinking it's better to commit the patch to trunk and branch-2 to fix the bug.
          Any thoughts?

          Show
          ajisakaa Akira Ajisaka added a comment - We need to decide what branches to commit. This patch will change the output of CLI command, so I'm thinking this is an incompatible change. In hadoop-1, rm command does not print messages to System.out, but it does print it to System.out in branch-2. Therefore, there is a long-term regression in hive silent mode as I mentioned before. Now I'm thinking it's better to commit the patch to trunk and branch-2 to fix the bug. Any thoughts?
          Hide
          hadoopqa Hadoop QA added a comment -



          -1 overall



          Vote Subsystem Runtime Comment
          0 pre-patch 17m 4s 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 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 javac 7m 52s There were no new javac warning messages.
          +1 javadoc 10m 5s 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 1m 9s There were no new checkstyle issues.
          +1 whitespace 0m 0s The patch has no lines that end in whitespace.
          +1 install 1m 30s mvn install still works.
          +1 eclipse:eclipse 0m 33s The patch built with eclipse:eclipse.
          +1 findbugs 1m 55s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
          +1 common tests 22m 56s Tests passed in hadoop-common.
              63m 30s  



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12754744/HDFS-9037.000.patch
          Optional Tests javadoc javac unit findbugs checkstyle
          git revision trunk / 94cf7ab
          hadoop-common test log https://builds.apache.org/job/PreCommit-HDFS-Build/12351/artifact/patchprocess/testrun_hadoop-common.txt
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/12351/testReport/
          Java 1.7.0_55
          uname Linux asf906.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/12351/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 17m 4s 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 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 javac 7m 52s There were no new javac warning messages. +1 javadoc 10m 5s 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 1m 9s There were no new checkstyle issues. +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 1m 30s mvn install still works. +1 eclipse:eclipse 0m 33s The patch built with eclipse:eclipse. +1 findbugs 1m 55s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 common tests 22m 56s Tests passed in hadoop-common.     63m 30s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12754744/HDFS-9037.000.patch Optional Tests javadoc javac unit findbugs checkstyle git revision trunk / 94cf7ab hadoop-common test log https://builds.apache.org/job/PreCommit-HDFS-Build/12351/artifact/patchprocess/testrun_hadoop-common.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/12351/testReport/ Java 1.7.0_55 uname Linux asf906.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/12351/console This message was automatically generated.
          Hide
          liuml07 Mingliang Liu added a comment -

          Thank Akira Ajisaka for your insights and review.

          Show
          liuml07 Mingliang Liu added a comment - Thank Akira Ajisaka for your insights and review.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          I verified the patch fixes the problem. +1 pending Jenkins.

          Show
          ajisakaa Akira Ajisaka added a comment - I verified the patch fixes the problem. +1 pending Jenkins.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          I'm +1 for this issue. We faced the problem that trash messages are logged to hive shell even in silent mode. I'll check the patch will fix it.

          Show
          ajisakaa Akira Ajisaka added a comment - I'm +1 for this issue. We faced the problem that trash messages are logged to hive shell even in silent mode. I'll check the patch will fix it.

            People

            • Assignee:
              liuml07 Mingliang Liu
              Reporter:
              ashutoshc Ashutosh Chauhan
            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development