0 votes
in HDFS by

How can you Add the arbitrary Key value pairs in your Mapper?

1 Answer

0 votes
by
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.
...