Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
MapReduce >> mail # user >> Question related to Decompressor interface

Copy link to this message
Re: Question related to Decompressor interface

> Can someone share some idea what the Hadoop source code of class
> org.apache.hadoop.io.compress.BlockDecompressorStream, method
> rawReadInt() is trying to do here?

The BlockDecompressorStream class is used for block-based decompression
(e.g. snappy).  Each chunk has a header indicating how many bytes it is.
That header is obtained by the rawReadInt method so it is expected to
return a non-negative value (since you can't have a negative length).