hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Dunning <ted.dunn...@gmail.com>
Subject Re: Using addCacheArchive
Date Thu, 02 Jul 2009 19:20:57 GMT
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 <akhilanger@gmail.com> 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()));
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message