Friday, 1 February 2013

How can you add the arbitrary key-value pairs in your mapper? | Hadoop Interview Questions

You can set arbitrary (key, value) pairs of configuration data in your Job, e.g. with  Job.getConfiguration().set("myKey", "myVal"), and then retrieve this data in your mapper with  Context.getConfiguration().get("myKey"). This kind of functionality is typically done in the Mapper's setup() method.

No comments: