I am using distributed cache in my mapreduce program and I am passing three variables to this mapreduce program input file
, output dir
and config file
.
I want to add the third argument i.e config file to the Distributed Cache.
I am setting the parameter as follows in run()
method of the MapReduce Driver:-
conf.set("CONF_XML", args[2]);
How to add this file into distributed cache in the same method. how do I do that ?
Usually we add using URI(new (file path));
DistributedCache.addCacheFile(new URI(file_path), conf); << here how to pass the argument parameter?