Change FileReader to InputStreamReader and pass din to it and you should be set.
BufferedReader wordReader = new BufferedReader(new InputStreamReader(din)); On Wed, Jul 1, 2009 at 9:23 PM, akhil1988 <[email protected]> wrote: > FileSystem fs = FileSystem.get(conf); > FSDataInputStream din = fs.open("/home/akhil1988/sample.txt"); > > The method (below)that you gave does not work: > Path cachePath= new Path("hdfs:///home/akhil1988/sample.txt"); > BufferedReader wordReader = new BufferedReader(new > FileReader(cachePath.toString())); >
