Ok using job.addCacheFile() seems to compile correctly.
However, how do I then access the cached file in my Mapper code? Is there a method that will look for any files in the cache?
From: Ted Yu [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 09, 2013 6:08 PM
To: [EMAIL PROTECTED]
Subject: Re: Distributed Cache
You should use Job#addCacheFile()
On Tue, Jul 9, 2013 at 3:02 PM, Botelho, Andrew <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote:
I was wondering if I can still use the DistributedCache class in the latest release of Hadoop (Version 2.0.5).
In my driver class, I use this code to try and add a file to the distributed cache:
Configuration conf = new Configuration();
DistributedCache.addCacheFile(new URI("file path in HDFS"), conf);
Job job = Job.getInstance();
However, I keep getting warnings that the method addCacheFile() is deprecated.
Is there a more current way to add files to the distributed cache?
Thanks in advance,