I am using DistributedCache. But there are no files in the cache after execution of code. I have referred to other similar questions but the answers does not solve my issue.
Please find the code below:
Configuration conf = new Configuration();
Job job1 = new Job(conf, "distributed cache");
Configuration conf1 = job1.getConfiguration();
DistributedCache.addCacheFile(new Path("File").toUri(), conf1);
System.out.println("distributed cache file "+DistributedCache.getLocalCacheFiles(conf1));
This gives null..
The same thing when given inside mapper also gives null hence. Please let me know your suggestions.
Thanks
File
exist in HDFS? Also the final call to getLocalCacheFiles will not work in your driver code (but should for your mapper - i'm assume you are only showing this line as an example). Find your job's job.xml in the job tracker web UI and post back the value ofmapred.cache.files
– Chris White 9 hours ago