Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-6166

Unnecessary INFO logs in AMRMClientAsyncImpl$CallbackHandlerThread.run

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.7.3
    • Fix Version/s: 2.9.0, 3.0.0-alpha4
    • Component/s: None
    • Labels:

      Description

      Logs like the following should be debug or else every legitimate stop causes unnecessary exception traces in the logs.

      2013-08-03 20:01:34,460 INFO [AMRM Callback Handler Thread] org.apache.hadoop.yarn.client.api.async.impl.AMRMClientAsyncImpl:       Interrupted while waiting for queue
       java.lang.InterruptedException
         at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.     java:1961)
         at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1996)
         at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)
         at org.apache.hadoop.yarn.client.api.async.impl.AMRMClientAsyncImpl$CallbackHandlerThread.run(AMRMClientAsyncImpl.java:275)
      

        Issue Links

          Activity

          Hide
          genericuser Grant W added a comment -

          YARN-1022 fixed unnecessary log messages from AMRMClientAsyncImpl$HeartbeatThread.run, but we still have unnecessary log messages from AMRMClientAsyncImpl$CallbackHandlerThread.run.

          17/02/09 13:27:42 INFO impl.AMRMClientAsyncImpl: Interrupted while waiting for queue
          java.lang.InterruptedException
          at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2017)
          at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2052)
          at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
          at org.apache.hadoop.yarn.client.api.async.impl.AMRMClientAsyncImpl$CallbackHandlerThread.run(AMRMClientAsyncImpl.java:274)

          Show
          genericuser Grant W added a comment - YARN-1022 fixed unnecessary log messages from AMRMClientAsyncImpl$HeartbeatThread.run, but we still have unnecessary log messages from AMRMClientAsyncImpl$CallbackHandlerThread.run. 17/02/09 13:27:42 INFO impl.AMRMClientAsyncImpl: Interrupted while waiting for queue java.lang.InterruptedException at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2017) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2052) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.hadoop.yarn.client.api.async.impl.AMRMClientAsyncImpl$CallbackHandlerThread.run(AMRMClientAsyncImpl.java:274)
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 23s Docker mode activated.
          +1 @author 0m 0s The patch does not contain any @author tags.
          -1 test4tests 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 mvninstall 16m 8s trunk passed
          +1 compile 0m 22s trunk passed
          +1 checkstyle 0m 17s trunk passed
          +1 mvnsite 0m 24s trunk passed
          +1 mvneclipse 0m 16s trunk passed
          +1 findbugs 0m 32s trunk passed
          +1 javadoc 0m 16s trunk passed
          +1 mvninstall 0m 20s the patch passed
          +1 compile 0m 19s the patch passed
          +1 javac 0m 19s the patch passed
          +1 checkstyle 0m 16s the patch passed
          +1 mvnsite 0m 22s the patch passed
          +1 mvneclipse 0m 13s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 0m 49s the patch passed
          +1 javadoc 0m 17s the patch passed
          -1 unit 17m 25s hadoop-yarn-client in the patch failed.
          +1 asflicense 0m 18s The patch does not generate ASF License warnings.
          40m 29s



          Reason Tests
          Failed junit tests hadoop.yarn.client.api.impl.TestAMRMProxy



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:a9ad5d6
          JIRA Issue YARN-6166
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12851942/YARN-6166.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux ede92cdad065 3.13.0-105-generic #152-Ubuntu SMP Fri Dec 2 15:37:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / 5fb723b
          Default Java 1.8.0_121
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-YARN-Build/14871/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-client.txt
          Test Results https://builds.apache.org/job/PreCommit-YARN-Build/14871/testReport/
          modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client
          Console output https://builds.apache.org/job/PreCommit-YARN-Build/14871/console
          Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 23s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 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 mvninstall 16m 8s trunk passed +1 compile 0m 22s trunk passed +1 checkstyle 0m 17s trunk passed +1 mvnsite 0m 24s trunk passed +1 mvneclipse 0m 16s trunk passed +1 findbugs 0m 32s trunk passed +1 javadoc 0m 16s trunk passed +1 mvninstall 0m 20s the patch passed +1 compile 0m 19s the patch passed +1 javac 0m 19s the patch passed +1 checkstyle 0m 16s the patch passed +1 mvnsite 0m 22s the patch passed +1 mvneclipse 0m 13s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 0m 49s the patch passed +1 javadoc 0m 17s the patch passed -1 unit 17m 25s hadoop-yarn-client in the patch failed. +1 asflicense 0m 18s The patch does not generate ASF License warnings. 40m 29s Reason Tests Failed junit tests hadoop.yarn.client.api.impl.TestAMRMProxy Subsystem Report/Notes Docker Image:yetus/hadoop:a9ad5d6 JIRA Issue YARN-6166 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12851942/YARN-6166.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux ede92cdad065 3.13.0-105-generic #152-Ubuntu SMP Fri Dec 2 15:37:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 5fb723b Default Java 1.8.0_121 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-YARN-Build/14871/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-client.txt Test Results https://builds.apache.org/job/PreCommit-YARN-Build/14871/testReport/ modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client Console output https://builds.apache.org/job/PreCommit-YARN-Build/14871/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          templedf Daniel Templeton added a comment -

          Thanks for the patch, haosdent. Could you also add a call to Thread.interrupt() before the continue?

          Show
          templedf Daniel Templeton added a comment - Thanks for the patch, haosdent . Could you also add a call to Thread.interrupt() before the continue ?
          Hide
          genericuser Grant W added a comment -

          haosdent got pulled in from the previous issue I cloned. I don't seem to have any way to remove him from assignee.

          I attached a new patch file with the interrupt call.

          Show
          genericuser Grant W added a comment - haosdent got pulled in from the previous issue I cloned. I don't seem to have any way to remove him from assignee. I attached a new patch file with the interrupt call.
          Hide
          templedf Daniel Templeton added a comment -

          I assigned the JIRA to you, Grant W. interrupt() isn't a static method, so I doubt that patch will compile. You'll have to get the current thread to call interrupt() on it. See https://www.ibm.com/developerworks/library/j-jtp05236/.

          Show
          templedf Daniel Templeton added a comment - I assigned the JIRA to you, Grant W . interrupt() isn't a static method, so I doubt that patch will compile. You'll have to get the current thread to call interrupt() on it. See https://www.ibm.com/developerworks/library/j-jtp05236/ .
          Hide
          genericuser Grant W added a comment -

          I've taken another crack at the patch. Hopefully I don't continue to embarrass myself.

          Show
          genericuser Grant W added a comment - I've taken another crack at the patch. Hopefully I don't continue to embarrass myself.
          Hide
          templedf Daniel Templeton added a comment -

          LGTM. +1

          Next, time, though, it's better to keep all the patches attached to the JIRA so that the history is preserved. To avoid confusion, we usually name them YARN-6166.001.patch, YARN-6166.002.patch, etc.

          I'll commit it in a bit.

          Show
          templedf Daniel Templeton added a comment - LGTM. +1 Next, time, though, it's better to keep all the patches attached to the JIRA so that the history is preserved. To avoid confusion, we usually name them YARN-6166 .001.patch, YARN-6166 .002.patch, etc. I'll commit it in a bit.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 34s Docker mode activated.
          +1 @author 0m 0s The patch does not contain any @author tags.
          -1 test4tests 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 mvninstall 14m 20s trunk passed
          +1 compile 0m 21s trunk passed
          +1 checkstyle 0m 15s trunk passed
          +1 mvnsite 0m 23s trunk passed
          +1 mvneclipse 0m 15s trunk passed
          +1 findbugs 0m 33s trunk passed
          +1 javadoc 0m 15s trunk passed
          +1 mvninstall 0m 19s the patch passed
          +1 compile 0m 18s the patch passed
          +1 javac 0m 18s the patch passed
          +1 checkstyle 0m 12s the patch passed
          +1 mvnsite 0m 19s the patch passed
          +1 mvneclipse 0m 12s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 0m 36s the patch passed
          +1 javadoc 0m 12s the patch passed
          +1 unit 16m 46s hadoop-yarn-client in the patch passed.
          +1 asflicense 0m 19s The patch does not generate ASF License warnings.
          37m 35s



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:a9ad5d6
          JIRA Issue YARN-6166
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12851955/YARN-6166.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 41e37dfb520b 3.13.0-105-generic #152-Ubuntu SMP Fri Dec 2 15:37:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / 08f9397
          Default Java 1.8.0_121
          findbugs v3.0.0
          Test Results https://builds.apache.org/job/PreCommit-YARN-Build/14873/testReport/
          modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client
          Console output https://builds.apache.org/job/PreCommit-YARN-Build/14873/console
          Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 34s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 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 mvninstall 14m 20s trunk passed +1 compile 0m 21s trunk passed +1 checkstyle 0m 15s trunk passed +1 mvnsite 0m 23s trunk passed +1 mvneclipse 0m 15s trunk passed +1 findbugs 0m 33s trunk passed +1 javadoc 0m 15s trunk passed +1 mvninstall 0m 19s the patch passed +1 compile 0m 18s the patch passed +1 javac 0m 18s the patch passed +1 checkstyle 0m 12s the patch passed +1 mvnsite 0m 19s the patch passed +1 mvneclipse 0m 12s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 0m 36s the patch passed +1 javadoc 0m 12s the patch passed +1 unit 16m 46s hadoop-yarn-client in the patch passed. +1 asflicense 0m 19s The patch does not generate ASF License warnings. 37m 35s Subsystem Report/Notes Docker Image:yetus/hadoop:a9ad5d6 JIRA Issue YARN-6166 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12851955/YARN-6166.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 41e37dfb520b 3.13.0-105-generic #152-Ubuntu SMP Fri Dec 2 15:37:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 08f9397 Default Java 1.8.0_121 findbugs v3.0.0 Test Results https://builds.apache.org/job/PreCommit-YARN-Build/14873/testReport/ modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client Console output https://builds.apache.org/job/PreCommit-YARN-Build/14873/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          templedf Daniel Templeton added a comment -

          Committed to trunk and branch-2. Thanks for the patch, Grant W.

          Show
          templedf Daniel Templeton added a comment - Committed to trunk and branch-2. Thanks for the patch, Grant W .
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11232 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11232/)
          YARN-6166. Unnecessary INFO logs in (templedf: rev 1238fa71f8e62cecde6e2437d1b83ad3922295f8)

          • (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/async/impl/AMRMClientAsyncImpl.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11232 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11232/ ) YARN-6166 . Unnecessary INFO logs in (templedf: rev 1238fa71f8e62cecde6e2437d1b83ad3922295f8) (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/async/impl/AMRMClientAsyncImpl.java
          Hide
          Naganarasimha Naganarasimha G R added a comment -

          Thanks for the contribution Grant W, just a small nit always ensure that LOG.isDebugEnabled() is checked before invoking LOG.debug

          Show
          Naganarasimha Naganarasimha G R added a comment - Thanks for the contribution Grant W , just a small nit always ensure that LOG.isDebugEnabled() is checked before invoking LOG.debug
          Hide
          templedf Daniel Templeton added a comment -

          Naganarasimha G R, given that the arg is a fixed string, does it really make that much difference? I would assume logging a message at a disabled level should be as cheap as checking the log level. I'm basing my assumption off the JDK's logging, where I know that was an explicit goal. I haven't looked at the code for the logging we use.

          Looking online, though, I see that Apache commons logging only recommends the guard clause to avoid expensive parameter evaluation:

          Code guards are typically used to guard code that only needs to execute in support of logging, that otherwise introduces undesirable runtime overhead in the general case (logging disabled). Examples are multiple parameters, or expressions (e.g. string + " more") for parameters. Use the guard methods of the form {{log.is<Priority>() }}to verify that logging should be performed, before incurring the overhead of the logging method call. Yes, the logging methods will perform the same check, but only after resolving parameters.

          I also see this link on Stack Overflow about Log4j: http://stackoverflow.com/questions/963492/in-log4j-does-checking-isdebugenabled-before-logging-improve-performance that says in the case of this JIRA it's better to leave out the guard clause.

          Show
          templedf Daniel Templeton added a comment - Naganarasimha G R , given that the arg is a fixed string, does it really make that much difference? I would assume logging a message at a disabled level should be as cheap as checking the log level. I'm basing my assumption off the JDK's logging, where I know that was an explicit goal. I haven't looked at the code for the logging we use. Looking online, though, I see that Apache commons logging only recommends the guard clause to avoid expensive parameter evaluation: Code guards are typically used to guard code that only needs to execute in support of logging, that otherwise introduces undesirable runtime overhead in the general case (logging disabled). Examples are multiple parameters, or expressions (e.g. string + " more") for parameters. Use the guard methods of the form {{log.is<Priority>() }}to verify that logging should be performed, before incurring the overhead of the logging method call. Yes, the logging methods will perform the same check, but only after resolving parameters. I also see this link on Stack Overflow about Log4j: http://stackoverflow.com/questions/963492/in-log4j-does-checking-isdebugenabled-before-logging-improve-performance that says in the case of this JIRA it's better to leave out the guard clause.

            People

            • Assignee:
              genericuser Grant W
              Reporter:
              genericuser Grant W
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development