[
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