[jira] [Commented] (YARN-8057) Inadequate information for handling catch clauses

2018-04-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-8057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16457887#comment-16457887
 ] 

ASF GitHub Bot commented on YARN-8057:
--

Github user G361963 commented on the issue:

https://github.com/apache/hadoop/pull/362
  
Hey Iq you have been in my phone a lot and who ever you been on here with 
is hacking my phone so tell me what an WHY u messing with my phone


> Inadequate information for handling catch clauses
> -
>
> Key: YARN-8057
> URL: https://issues.apache.org/jira/browse/YARN-8057
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: api, yarn
>Affects Versions: 3.0.0
>Reporter: Zhenhao Li
>Priority: Major
>  Labels: easyfix
>
> Their are some situations that different exception types are caught, but the 
> handling of those exceptions can not show the differences of those types. 
> Here are the code snippets we found which have this problem:
> *org/apache/hadoop/yarn/client/api/impl/NMClientImpl.java*
> [https://github.com/apache/hadoop/blob/c02d2ba50db8a355ea03081c3984b2ea0c375a3f/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/impl/NMClientImpl.java]
> At Line *125* and Line *129.* We can see that two exception types are caught, 
> but the logging statements here can not show the exception type at all. It 
> may cause confusions to the person who is reading the log, the person can not 
> know what exception happened here.
>  
> Maybe adding stack trace information to these two logging statements is a 
> simple way to improve it.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Commented] (YARN-8057) Inadequate information for handling catch clauses

2018-04-21 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-8057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16447024#comment-16447024
 ] 

ASF GitHub Bot commented on YARN-8057:
--

Github user lzh3636 commented on a diff in the pull request:

https://github.com/apache/hadoop/pull/362#discussion_r183220591
  
--- Diff: 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/impl/NMClientImpl.java
 ---
@@ -124,11 +124,11 @@ protected synchronized void 
cleanupRunningContainers() {
   } catch (YarnException e) {
 LOG.error("Failed to stop Container " +
 startedContainer.getContainerId() +
-"when stopping NMClientImpl");
+"when stopping NMClientImpl", e);
--- End diff --

If there's no "e", the log here will only show the message "Failed to stop 
Container ### when stopping NMClientImpl". People will only know there's 
something wrong here, but will not know what's wrong here. (YarnException? 
IOException?)
If add an "e" here, the exception type and position where this exception 
happens will also be generated to the log, so that people will know what's 
wrong here.


> Inadequate information for handling catch clauses
> -
>
> Key: YARN-8057
> URL: https://issues.apache.org/jira/browse/YARN-8057
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: api, yarn
>Affects Versions: 3.0.0
>Reporter: Zhenhao Li
>Priority: Major
>  Labels: easyfix
>
> Their are some situations that different exception types are caught, but the 
> handling of those exceptions can not show the differences of those types. 
> Here are the code snippets we found which have this problem:
> *org/apache/hadoop/yarn/client/api/impl/NMClientImpl.java*
> [https://github.com/apache/hadoop/blob/c02d2ba50db8a355ea03081c3984b2ea0c375a3f/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/impl/NMClientImpl.java]
> At Line *125* and Line *129.* We can see that two exception types are caught, 
> but the logging statements here can not show the exception type at all. It 
> may cause confusions to the person who is reading the log, the person can not 
> know what exception happened here.
>  
> Maybe adding stack trace information to these two logging statements is a 
> simple way to improve it.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Commented] (YARN-8057) Inadequate information for handling catch clauses

2018-04-21 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-8057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16447014#comment-16447014
 ] 

ASF GitHub Bot commented on YARN-8057:
--

Github user lqjack commented on a diff in the pull request:

https://github.com/apache/hadoop/pull/362#discussion_r183219982
  
--- Diff: 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/impl/NMClientImpl.java
 ---
@@ -124,11 +124,11 @@ protected synchronized void 
cleanupRunningContainers() {
   } catch (YarnException e) {
 LOG.error("Failed to stop Container " +
 startedContainer.getContainerId() +
-"when stopping NMClientImpl");
+"when stopping NMClientImpl", e);
--- End diff --

what’s the e user for in log? 


> Inadequate information for handling catch clauses
> -
>
> Key: YARN-8057
> URL: https://issues.apache.org/jira/browse/YARN-8057
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: api, yarn
>Affects Versions: 3.0.0
>Reporter: Zhenhao Li
>Priority: Major
>  Labels: easyfix
>
> Their are some situations that different exception types are caught, but the 
> handling of those exceptions can not show the differences of those types. 
> Here are the code snippets we found which have this problem:
> *org/apache/hadoop/yarn/client/api/impl/NMClientImpl.java*
> [https://github.com/apache/hadoop/blob/c02d2ba50db8a355ea03081c3984b2ea0c375a3f/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/impl/NMClientImpl.java]
> At Line *125* and Line *129.* We can see that two exception types are caught, 
> but the logging statements here can not show the exception type at all. It 
> may cause confusions to the person who is reading the log, the person can not 
> know what exception happened here.
>  
> Maybe adding stack trace information to these two logging statements is a 
> simple way to improve it.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Commented] (YARN-8057) Inadequate information for handling catch clauses

2018-04-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-8057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16434813#comment-16434813
 ] 

ASF GitHub Bot commented on YARN-8057:
--

Github user leekyosek commented on the issue:

https://github.com/apache/hadoop/pull/362
  
Good


> Inadequate information for handling catch clauses
> -
>
> Key: YARN-8057
> URL: https://issues.apache.org/jira/browse/YARN-8057
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: api, yarn
>Affects Versions: 3.0.0
>Reporter: Zhenhao Li
>Priority: Major
>  Labels: easyfix
>
> Their are some situations that different exception types are caught, but the 
> handling of those exceptions can not show the differences of those types. 
> Here are the code snippets we found which have this problem:
> *org/apache/hadoop/yarn/client/api/impl/NMClientImpl.java*
> [https://github.com/apache/hadoop/blob/c02d2ba50db8a355ea03081c3984b2ea0c375a3f/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/impl/NMClientImpl.java]
> At Line *125* and Line *129.* We can see that two exception types are caught, 
> but the logging statements here can not show the exception type at all. It 
> may cause confusions to the person who is reading the log, the person can not 
> know what exception happened here.
>  
> Maybe adding stack trace information to these two logging statements is a 
> simple way to improve it.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Commented] (YARN-8057) Inadequate information for handling catch clauses

2018-04-10 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-8057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16432420#comment-16432420
 ] 

ASF GitHub Bot commented on YARN-8057:
--

GitHub user lzh3636 opened a pull request:

https://github.com/apache/hadoop/pull/362

YARN-8057 Inadequate information for handling catch clauses

The description of the problem:
https://issues.apache.org/jira/browse/YARN-8057
I added stack traces information to those two logging statements, so that 
the full exception information can be generated to the logs.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/lzh3636/hadoop YARN-8057

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/hadoop/pull/362.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #362


commit 002935625784226ba915e8631a0c8298d423677f
Author: lzh3636 
Date:   2018-04-10T15:03:54Z

update stack traces to show exception info




> Inadequate information for handling catch clauses
> -
>
> Key: YARN-8057
> URL: https://issues.apache.org/jira/browse/YARN-8057
> Project: Hadoop YARN
>  Issue Type: Improvement
>  Components: api, yarn
>Affects Versions: 3.0.0
>Reporter: Zhenhao Li
>Priority: Major
>  Labels: easyfix
>
> Their are some situations that different exception types are caught, but the 
> handling of those exceptions can not show the differences of those types. 
> Here are the code snippets we found which have this problem:
> *org/apache/hadoop/yarn/client/api/impl/NMClientImpl.java*
> [https://github.com/apache/hadoop/blob/c02d2ba50db8a355ea03081c3984b2ea0c375a3f/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/impl/NMClientImpl.java]
> At Line *125* and Line *129.* We can see that two exception types are caught, 
> but the logging statements here can not show the exception type at all. It 
> may cause confusions to the person who is reading the log, the person can not 
> know what exception happened here.
>  
> Maybe adding stack trace information to these two logging statements is a 
> simple way to improve it.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org