[ 
https://issues.apache.org/jira/browse/HADOOP-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Boris Shkolnik updated HADOOP-4756:
-----------------------------------

    Attachment: HADOOP-4756-2.patch

# General
## nits - Coding conventions - have consistent convention for space before and 
after assignemtn {{=}}). Space is required after {{if}}, {{for}}, {{,}} and 
parenthesis around the {{if}} statement.
bq. Done
## debug logs are sent to {{err}}. Not sure if that is the right thing to do. 
bq. This is a script. It should write either to stdout or stderr. I want user 
to be able to separate logs from the output.
## Where possible, instead of catching {{Exception}}, catch more specific 
exceptions expected
bq. Changed to specific Exceptions where possible. But some of JMX functions 
can throw many different not related exceptions so I need to use Exception.
## There is a difference in exceptions caught in {{getValue{}}} compared 
{{printAllValues()}}. Should they be the same?
bq. Fixed
# {{hdfs}}
## Add new command jmxget to the usage
bq. Done
# {{JMXGet.java}}
## Following imports are not used:
{noformat}
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;
{noformat}
bq. Done
## Move member variables to the top of the class
bq. Done
## {{main()}} Like other commands such as {{DFSAdmin.java}} should we use 
ToolRunner to start this tool?
bq. No. I tried to make the script independent of hadoop code. So it can be run 
on any machine.
## {{JMXGet()}} Constructor comments are not right - there is no conf param.
bq. Fixed
## {{run()}} Method comments are not right. There is not parameter {{args}}
bq. Fixed
## {{parseArgs()}} instead of catching ParserException, should it be thrown? 
That way {{init()}} or {{run()}} can catch it and do the required error 
processing
bq. I rewritten this piece.
## {{init()}} 
### Should only throw {{IOException}} not generic {{Exception}}
bq. See comment about exceptions above
### defined {{port}}, {{server}} as static String variables such as 
{{DEFAULT_PORT}}, {{DEFAULT_SERVER}}
bq. Removed
### No need to catch exception while doing {{JMXConnectorFactory.connect()}}, 
as it can be caught by {{run()}} 
bq. Changed
### Remove commented code in the {{for}} loop
bq. Done
## {{printUsage()}} method comment says GMX instead of JMX
bq. Done
## {{printAllValues()}} should method comment be saying {{Print all the 
attribute values}}?
bq. Done

> Create a command line tool to access JMX exported properties from a NameNode 
> server
> -----------------------------------------------------------------------------------
>
>                 Key: HADOOP-4756
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4756
>             Project: Hadoop Core
>          Issue Type: New Feature
>          Components: dfs
>            Reporter: Boris Shkolnik
>            Assignee: Boris Shkolnik
>         Attachments: HADOOP-4756-1.patch, HADOOP-4756-2.patch, 
> HADOOP-4756.patch, HADOOP-4756.patch, HADOOP-4756.patch
>
>
> Create a command line tool that will easy script access to JMX exported 
> properties of the NameNode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to