[
https://issues.apache.org/jira/browse/HADOOP-1425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12498833
]
Owen O'Malley commented on HADOOP-1425:
---------------------------------------
I would make the trivial example be:
{code}
public class Foo {
public static void main(String[] argv) throws Exception {
JobClient.runJob(new OptionParser().fillInConfiguration(new JobConf(),
argv));
}
}
{code}
JobClient likely should have another method that calls System.exit with the
result of the run, but that is neither here nor there. By making it a straight
library, you have made the code easier to understand with well separated areas
of concern. There are also easy ways to add additional parameters, etc.
> Rework the various programs in 'examples' to extend ToolBase
> -------------------------------------------------------------
>
> Key: HADOOP-1425
> URL: https://issues.apache.org/jira/browse/HADOOP-1425
> Project: Hadoop
> Issue Type: Improvement
> Components: examples
> Reporter: Arun C Murthy
> Assigned To: Enis Soztutar
> Priority: Minor
> Fix For: 0.14.0
>
>
> Ensuring all 'examples' extend ToolBase will make it easy to tweak various
> config params (via -D switches for e.g.) while running the programs...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.