How to unzip files stored in HDFS using Java, without first copying to the local file system?

Viewed 2217

We are storing zip files, containing XML files, in HDFS. We need to be able to programmatically unzip the file and stream out the contained XML files, using Java. FileSystem.open returns a FSDataInputStream but ZipFile constructors only take File or String as parameters. I really don't want to have to use FileSystem.copyToLocalFile.

Is it possible to stream the contents of a zip file stored in HDFS without first copying the zip file to the local file system? If so how?

1 Answers
Related