Home > Hadoop, Uncategorized > Hadoop GenericOptionsParser

Hadoop GenericOptionsParser

GenericOptionsParser is used in ToolRunner to parse out the generic options, -conf, -D, -jt, -files, -libjars, -archives and set these generic options in the job configuration accordingly. Any leftover remaining command options will then be passed to our mapreduce job by calling the run(toolArgs).

String[] toolArgs = parser.getRemainingArgs();  //get any remaining command options other than the generic options

return tool.run(toolArgs);

Since our mapreduce job implements the run(String[] args) method, we will get passed all the remaining command options and can use them for configuring our job.

Advertisements
Categories: Hadoop, Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: