Extract .zip file to hdfs

I want to unzip a zip file to hdfs and save the output to hdf. I tried to execute the command hadoop fs -text testData/sample/slarge.zip | hadoop fs -put - testData/sample1/uncompressed-file.txt

but it doesn't work as expected and gets garbage result from the output. Is there a way to unzip the file to hdfs?

Note: the file is a .zip file .GZIP file.

+3


source to share





All Articles