DeepNightTwo
DeepNightTwo

Reputation: 4961

How to decompress the hadoop reduce output file end with snappy?

Our hadoop cluster using snappy as default codec. Hadoop job reduce output file name is like part-r-00000.snappy. JSnappy fails to decompress the file bcz JSnappy requires the file start with SNZ. The reduce output file start with some bytes 0 somehow.

How could I decompress the file?

Upvotes: 13

Views: 21395

Answers (1)

arviarya
arviarya

Reputation: 660

Use "Hadoop fs -text" to read this file and pipe it to txt file. ex:

hadoop fs -text part-r-00001.snappy > /tmp/mydatafile.txt

Upvotes: 18

Related Questions