I searched a lot but failed to find a solution to this problem. Actually the file I want to access is in HDFS, but not in input path (the path which was input to the map/reduce job). And I want to access it from mapper. The hdfs path specified in the input path is perfectly accessible from mapper but the other hdfs files are not.
INside mapper:-
FileSystem FS1=FileSystem.get(conf);
Path path=new Path(""+FS1.getHomeDirectory());
FSDataInputStream fsdis=FS1.open(path);
RESULTS IN the following ERROR: java.io.IOException : Cannot open filename /user/hadoop
Thanks in advance, Harsh
/user/hadoopshould be a directory, so I don't thinkFileSystem.open()will function the same as if it were a file. - Matt D