I just wanted to try a tutorial (https://ccp.cloudera.com/display/DOC/Hadoop+Tutorial) program WordCount V.2 (bottom of the page) in which they are using the following method to set up some basic variables for the programm:
public void configure(JobConf job) {
...
}
However I’m trying to use the new Hadoop API and this method does not seem to exist anymore? Can anyone tell me what the equivalent way of doing something like this in the new API is?
Also how can I access my Configuration during runtime? Do I simply call:
Job.getConfiguration();
You can override the setup method in your
Mapper/Reducer, this will behave likeconfigure.The signature looks as follows:
There you get a
Contextobject, where you can call:mapandcleanup, both have these context objects, so you can get yourConfigurationanytime.