using hadoop 0.20.2 and trying to read a serialized map via distributed cache
facing a compilation error localFiles = DistributedCache.getLocalCacheFiles(job); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Unhandled exception type IOException
DRIVER Class snippet (/scratch/word_id.ser is a serialized file stored in local system)
Job job = new Job(conf, "xml-read");
DistributedCache.addCacheFile(new URI("/scratch/word_id.ser"),job);
MAPPER Class snippet
public class MyParserMapper1 {
public static class Map extends MapReduceBase implements Mapper<LongWritable, Text, IntWritable, Text> {
private FileSystem fs;
private Path[] localFiles;
HashMap hash_temp;
private ObjectInputStream oisc;
@Override
public void configure(JobConf job) {
localFiles = DistributedCache.getLocalCacheFiles(job);
}