The Hadoop framework is very flexible and can be tuned using a number of configuration parameters. In this recipe, we will discuss the function and purpose of different configuration parameters you can set for a MapReduce job.
Ensure that you have a MapReduce job which has a job class that extends the Hadoop Configuration
class and implements the Hadoop Tool
interface, such as any MapReduce application we have written so far in this book.
Follow these steps to customize MapReduce job parameters:
Ensure you have a MapReduce job class which extends the Hadoop
Configuration
class and theTool
interface.Use the
ToolRunner.run()
static method to run your MapReduce job, as shown in the following example:public static void main(String[] args) throws Exception { int exitCode = ToolRunner.run(new MyMapReduceJob(), args); System.exit(exitCode); }
Examine the following table of Hadoop job properties and values:
Property name
Possible...