You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Daryn Sharp (JIRA)" <ji...@apache.org> on 2011/06/02 17:03:47 UTC
[jira] [Created] (HADOOP-7353) Display of errors masks details of
some exceptions
Display of errors masks details of some exceptions
--------------------------------------------------
Key: HADOOP-7353
URL: https://issues.apache.org/jira/browse/HADOOP-7353
Project: Hadoop Common
Issue Type: Bug
Components: fs
Affects Versions: 0.23.0
Reporter: Daryn Sharp
Assignee: Daryn Sharp
{{FsShell}}'s top level exception handler catches and displays exceptions. Unfortunately it displays only the first line of an exception, which means an unexpected {{RuntimeExceptions}} like {{NullPointerException}} only display "{{cmd: NullPointerException}}". This user has no context to understand and/or accurately report the issue.
Found due to bugs such as {{HADOOP-7327}}.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HADOOP-7353) Cleanup FsShell and prevent masking
of RTE stacktraces
Posted by "Daryn Sharp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daryn Sharp updated HADOOP-7353:
--------------------------------
Summary: Cleanup FsShell and prevent masking of RTE stacktraces (was: Display of errors masks details of some exceptions)
> Cleanup FsShell and prevent masking of RTE stacktraces
> ------------------------------------------------------
>
> Key: HADOOP-7353
> URL: https://issues.apache.org/jira/browse/HADOOP-7353
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 0.23.0
> Reporter: Daryn Sharp
> Assignee: Daryn Sharp
>
> {{FsShell}}'s top level exception handler catches and displays exceptions. Unfortunately it displays only the first line of an exception, which means an unexpected {{RuntimeExceptions}} like {{NullPointerException}} only display "{{cmd: NullPointerException}}". This user has no context to understand and/or accurately report the issue.
> Found due to bugs such as {{HADOOP-7327}}.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HADOOP-7353) Cleanup FsShell and prevent masking
of RTE stacktraces
Posted by "Daryn Sharp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daryn Sharp updated HADOOP-7353:
--------------------------------
Status: Patch Available (was: Open)
> Cleanup FsShell and prevent masking of RTE stacktraces
> ------------------------------------------------------
>
> Key: HADOOP-7353
> URL: https://issues.apache.org/jira/browse/HADOOP-7353
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 0.23.0
> Reporter: Daryn Sharp
> Assignee: Daryn Sharp
> Attachments: HADOOP-7353.patch
>
>
> {{FsShell}}'s top level exception handler catches and displays exceptions. Unfortunately it displays only the first line of an exception, which means an unexpected {{RuntimeExceptions}} like {{NullPointerException}} only display "{{cmd: NullPointerException}}". This user has no context to understand and/or accurately report the issue.
> Found due to bugs such as {{HADOOP-7327}}.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-7353) Cleanup FsShell and prevent
masking of RTE stacktraces
Posted by "Aaron T. Myers (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044740#comment-13044740 ]
Aaron T. Myers commented on HADOOP-7353:
----------------------------------------
Looks pretty good, Daryn. A few small nits:
* There's no need to expressly initialize the instance variables in the {{FsShell} ctor to {{null}}. Java will do that automatically.
* "The follow methods are syntactic sugar." - They're not really "_syntactic_" sugar, as much as they are just helpers.
* "if (instance == null) throw new UnknownCommandException(cmd);" - coding guidelines say to put always use braces on {{if}} statements, and always put the body on a new line.
* There seems to be an inconsistency with printing to stdout vs. stderr, or at least I can't tell why you chose to use one in some places, and the other in other places.
* "// historical abstract method in Command " - move this comment above the method.
> Cleanup FsShell and prevent masking of RTE stacktraces
> ------------------------------------------------------
>
> Key: HADOOP-7353
> URL: https://issues.apache.org/jira/browse/HADOOP-7353
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 0.23.0
> Reporter: Daryn Sharp
> Assignee: Daryn Sharp
> Attachments: HADOOP-7353.patch
>
>
> {{FsShell}}'s top level exception handler catches and displays exceptions. Unfortunately it displays only the first line of an exception, which means an unexpected {{RuntimeExceptions}} like {{NullPointerException}} only display "{{cmd: NullPointerException}}". This user has no context to understand and/or accurately report the issue.
> Found due to bugs such as {{HADOOP-7327}}.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-7353) Cleanup FsShell and prevent
masking of RTE stacktraces
Posted by "Daryn Sharp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043896#comment-13043896 ]
Daryn Sharp commented on HADOOP-7353:
-------------------------------------
I also removed the slew of pre-existing warnings in {{FsShell}}...
> Cleanup FsShell and prevent masking of RTE stacktraces
> ------------------------------------------------------
>
> Key: HADOOP-7353
> URL: https://issues.apache.org/jira/browse/HADOOP-7353
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 0.23.0
> Reporter: Daryn Sharp
> Assignee: Daryn Sharp
> Attachments: HADOOP-7353.patch
>
>
> {{FsShell}}'s top level exception handler catches and displays exceptions. Unfortunately it displays only the first line of an exception, which means an unexpected {{RuntimeExceptions}} like {{NullPointerException}} only display "{{cmd: NullPointerException}}". This user has no context to understand and/or accurately report the issue.
> Found due to bugs such as {{HADOOP-7327}}.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-7353) Cleanup FsShell and prevent
masking of RTE stacktraces
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043894#comment-13043894 ]
Hadoop QA commented on HADOOP-7353:
-----------------------------------
+1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12481372/HADOOP-7353.patch
against trunk revision 1130833.
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 4 new or modified tests.
+1 javadoc. The javadoc tool did not generate any warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+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 core unit tests.
+1 system test framework. The patch passed system test framework compile.
Test results: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/569//testReport/
Findbugs warnings: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/569//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/569//console
This message is automatically generated.
> Cleanup FsShell and prevent masking of RTE stacktraces
> ------------------------------------------------------
>
> Key: HADOOP-7353
> URL: https://issues.apache.org/jira/browse/HADOOP-7353
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 0.23.0
> Reporter: Daryn Sharp
> Assignee: Daryn Sharp
> Attachments: HADOOP-7353.patch
>
>
> {{FsShell}}'s top level exception handler catches and displays exceptions. Unfortunately it displays only the first line of an exception, which means an unexpected {{RuntimeExceptions}} like {{NullPointerException}} only display "{{cmd: NullPointerException}}". This user has no context to understand and/or accurately report the issue.
> Found due to bugs such as {{HADOOP-7327}}.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-7353) Cleanup FsShell and prevent
masking of RTE stacktraces
Posted by "Aaron T. Myers (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045068#comment-13045068 ]
Aaron T. Myers commented on HADOOP-7353:
----------------------------------------
+1, latest patch looks good to me.
> Cleanup FsShell and prevent masking of RTE stacktraces
> ------------------------------------------------------
>
> Key: HADOOP-7353
> URL: https://issues.apache.org/jira/browse/HADOOP-7353
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 0.23.0
> Reporter: Daryn Sharp
> Assignee: Daryn Sharp
> Attachments: HADOOP-7353-2.patch, HADOOP-7353.patch
>
>
> {{FsShell}}'s top level exception handler catches and displays exceptions. Unfortunately it displays only the first line of an exception, which means an unexpected {{RuntimeExceptions}} like {{NullPointerException}} only display "{{cmd: NullPointerException}}". This user has no context to understand and/or accurately report the issue.
> Found due to bugs such as {{HADOOP-7327}}.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HADOOP-7353) Cleanup FsShell and prevent masking
of RTE stacktraces
Posted by "Daryn Sharp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daryn Sharp updated HADOOP-7353:
--------------------------------
Attachment: HADOOP-7353-2.patch
Thanks Aaron!
bq. There's no need to expressly initialize the instance variables in the {{FsShell}} ctor to {{null}}. Java will do that automatically.
Sure, I removed the initialization.
bq. "The follow methods are syntactic sugar." - They're not really "syntactic" sugar, as much as they are just helpers.
Changed.
bq. "if (instance == null) throw new UnknownCommandException(cmd);" - coding guidelines say to put always use braces on if statements, and always put the body on a new line.
Changed. I found a few more, so I changed them too.
bq. There seems to be an inconsistency with printing to stdout vs. stderr, or at least I can't tell why you chose to use one in some places, and the other in other places.
The -help/-usage commands will print to stdout. The usage goes to stderr when no command is given, or because of an illegal argument.
bq. "// historical abstract method in Command " - move this comment above the method.
Moved.
Thanks again!
> Cleanup FsShell and prevent masking of RTE stacktraces
> ------------------------------------------------------
>
> Key: HADOOP-7353
> URL: https://issues.apache.org/jira/browse/HADOOP-7353
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 0.23.0
> Reporter: Daryn Sharp
> Assignee: Daryn Sharp
> Attachments: HADOOP-7353-2.patch, HADOOP-7353.patch
>
>
> {{FsShell}}'s top level exception handler catches and displays exceptions. Unfortunately it displays only the first line of an exception, which means an unexpected {{RuntimeExceptions}} like {{NullPointerException}} only display "{{cmd: NullPointerException}}". This user has no context to understand and/or accurately report the issue.
> Found due to bugs such as {{HADOOP-7327}}.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-7353) Cleanup FsShell and prevent
masking of RTE stacktraces
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045119#comment-13045119 ]
Hudson commented on HADOOP-7353:
--------------------------------
Integrated in Hadoop-Common-trunk-Commit #643 (See [https://builds.apache.org/hudson/job/Hadoop-Common-trunk-Commit/643/])
HADOOP-7353. Cleanup FsShell and prevent masking of RTE stack traces. Contributed by Daryn Sharp.
todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1132764
Files :
* /hadoop/common/trunk/src/java/org/apache/hadoop/fs/shell/Count.java
* /hadoop/common/trunk/src/java/org/apache/hadoop/fs/shell/FsCommand.java
* /hadoop/common/trunk/CHANGES.txt
* /hadoop/common/trunk/src/java/org/apache/hadoop/fs/shell/CommandFactory.java
* /hadoop/common/trunk/src/test/core/org/apache/hadoop/cli/testConf.xml
* /hadoop/common/trunk/src/java/org/apache/hadoop/fs/shell/Command.java
* /hadoop/common/trunk/src/java/org/apache/hadoop/fs/shell/Display.java
* /hadoop/common/trunk/src/java/org/apache/hadoop/fs/FsShell.java
> Cleanup FsShell and prevent masking of RTE stacktraces
> ------------------------------------------------------
>
> Key: HADOOP-7353
> URL: https://issues.apache.org/jira/browse/HADOOP-7353
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 0.23.0
> Reporter: Daryn Sharp
> Assignee: Daryn Sharp
> Fix For: 0.23.0
>
> Attachments: HADOOP-7353-2.patch, HADOOP-7353.patch
>
>
> {{FsShell}}'s top level exception handler catches and displays exceptions. Unfortunately it displays only the first line of an exception, which means an unexpected {{RuntimeExceptions}} like {{NullPointerException}} only display "{{cmd: NullPointerException}}". This user has no context to understand and/or accurately report the issue.
> Found due to bugs such as {{HADOOP-7327}}.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HADOOP-7353) Cleanup FsShell and prevent masking
of RTE stacktraces
Posted by "Daryn Sharp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daryn Sharp updated HADOOP-7353:
--------------------------------
Attachment: HADOOP-7353.patch
Cleanup exception handling in {{FsShell.run()}} method to print the stack trace of unexpected exceptions such as NPEs.
Converted -help & -usage into {{FsCommand}} subclasses to greatly simplify the aforementioned exception handling block. All conditional chains are now gone! Everything is dynamic.
A few trivial changes to {{Command}} & {{CommandFactory}} to support nested classes needed for -help/-usage to access the {{CommandFactory}}.
Break shell object instantiation, and population of commandFactory, into separate methods so DFSAdmin (already a subclass) can eventually take advantage of the modularity.
> Cleanup FsShell and prevent masking of RTE stacktraces
> ------------------------------------------------------
>
> Key: HADOOP-7353
> URL: https://issues.apache.org/jira/browse/HADOOP-7353
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 0.23.0
> Reporter: Daryn Sharp
> Assignee: Daryn Sharp
> Attachments: HADOOP-7353.patch
>
>
> {{FsShell}}'s top level exception handler catches and displays exceptions. Unfortunately it displays only the first line of an exception, which means an unexpected {{RuntimeExceptions}} like {{NullPointerException}} only display "{{cmd: NullPointerException}}". This user has no context to understand and/or accurately report the issue.
> Found due to bugs such as {{HADOOP-7327}}.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-7353) Cleanup FsShell and prevent
masking of RTE stacktraces
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044923#comment-13044923 ]
Hadoop QA commented on HADOOP-7353:
-----------------------------------
+1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12481578/HADOOP-7353-2.patch
against trunk revision 1132511.
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 4 new or modified tests.
+1 javadoc. The javadoc tool did not generate any warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+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 core unit tests.
+1 system test framework. The patch passed system test framework compile.
Test results: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/581//testReport/
Findbugs warnings: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/581//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/581//console
This message is automatically generated.
> Cleanup FsShell and prevent masking of RTE stacktraces
> ------------------------------------------------------
>
> Key: HADOOP-7353
> URL: https://issues.apache.org/jira/browse/HADOOP-7353
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 0.23.0
> Reporter: Daryn Sharp
> Assignee: Daryn Sharp
> Attachments: HADOOP-7353-2.patch, HADOOP-7353.patch
>
>
> {{FsShell}}'s top level exception handler catches and displays exceptions. Unfortunately it displays only the first line of an exception, which means an unexpected {{RuntimeExceptions}} like {{NullPointerException}} only display "{{cmd: NullPointerException}}". This user has no context to understand and/or accurately report the issue.
> Found due to bugs such as {{HADOOP-7327}}.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HADOOP-7353) Cleanup FsShell and prevent masking
of RTE stacktraces
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Todd Lipcon updated HADOOP-7353:
--------------------------------
Resolution: Fixed
Fix Version/s: 0.23.0
Hadoop Flags: [Reviewed]
Status: Resolved (was: Patch Available)
Committed to trunk based on atm's +1 and a quick sanity check. Thanks Daryn/Aaron.
> Cleanup FsShell and prevent masking of RTE stacktraces
> ------------------------------------------------------
>
> Key: HADOOP-7353
> URL: https://issues.apache.org/jira/browse/HADOOP-7353
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 0.23.0
> Reporter: Daryn Sharp
> Assignee: Daryn Sharp
> Fix For: 0.23.0
>
> Attachments: HADOOP-7353-2.patch, HADOOP-7353.patch
>
>
> {{FsShell}}'s top level exception handler catches and displays exceptions. Unfortunately it displays only the first line of an exception, which means an unexpected {{RuntimeExceptions}} like {{NullPointerException}} only display "{{cmd: NullPointerException}}". This user has no context to understand and/or accurately report the issue.
> Found due to bugs such as {{HADOOP-7327}}.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-7353) Cleanup FsShell and prevent
masking of RTE stacktraces
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045367#comment-13045367 ]
Hudson commented on HADOOP-7353:
--------------------------------
Integrated in Hadoop-Common-trunk #712 (See [https://builds.apache.org/job/Hadoop-Common-trunk/712/])
HADOOP-7353. Cleanup FsShell and prevent masking of RTE stack traces. Contributed by Daryn Sharp.
todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1132764
Files :
* /hadoop/common/trunk/src/java/org/apache/hadoop/fs/shell/Count.java
* /hadoop/common/trunk/src/java/org/apache/hadoop/fs/shell/FsCommand.java
* /hadoop/common/trunk/CHANGES.txt
* /hadoop/common/trunk/src/java/org/apache/hadoop/fs/shell/CommandFactory.java
* /hadoop/common/trunk/src/test/core/org/apache/hadoop/cli/testConf.xml
* /hadoop/common/trunk/src/java/org/apache/hadoop/fs/shell/Command.java
* /hadoop/common/trunk/src/java/org/apache/hadoop/fs/shell/Display.java
* /hadoop/common/trunk/src/java/org/apache/hadoop/fs/FsShell.java
> Cleanup FsShell and prevent masking of RTE stacktraces
> ------------------------------------------------------
>
> Key: HADOOP-7353
> URL: https://issues.apache.org/jira/browse/HADOOP-7353
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 0.23.0
> Reporter: Daryn Sharp
> Assignee: Daryn Sharp
> Fix For: 0.23.0
>
> Attachments: HADOOP-7353-2.patch, HADOOP-7353.patch
>
>
> {{FsShell}}'s top level exception handler catches and displays exceptions. Unfortunately it displays only the first line of an exception, which means an unexpected {{RuntimeExceptions}} like {{NullPointerException}} only display "{{cmd: NullPointerException}}". This user has no context to understand and/or accurately report the issue.
> Found due to bugs such as {{HADOOP-7327}}.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira