hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Rosenstrauch <dar...@darose.net>
Subject Re: Example on how to decompress the output file?
Date Tue, 05 Jul 2011 15:34:04 GMT
On 07/05/2011 11:24 AM, Pedro Sa Costa wrote:
>
> Hi,
>
> In my hadoop running example, the data ouput is compressed using gzip. I would
> like to create a small java program that decompress the output.  Can anyone
> give an example on how to decompress the output in java using the hadoop API?

Write a Java app which read from an input stream (until EOF), where the 
input stream is like so:

FileSystem fs = FileSystem.getLocal(conf);
InputStream hdfsIn = fs.open(filePath);
InputStream in = new GZIPInputStream(hdfsIn);

DR

Mime
View raw message