Processing password protected zip files using Mapr

2019-09-21 15:00发布

This question already has an answer here:

I want to process password protected zipped files using Hadoop mapreduce. I was able to process unprotected zip files using ZipFileInputformat. But it doesn't support password protected zips. Is there any Java library that provide stream access to password protected zip files or extract zip files if I can make its byte content available ? Thanks in Advance.

1条回答
forever°为你锁心
2楼-- · 2019-09-21 15:27

Assuming you can find a java library that can read password protected zip files (see this blog article for an example), you should be able to modify the current ZipFileInputFormat to use this library and then you'll just need to configure the password for each zip file via a configuration option (hopefully you don't have too many files, or all the files are protected using the same password).

It should be easy enough. Give it a try and if you run into problems, post another question - or ask author of the input format (https://github.com/cotdp/com-cotdp-hadoop is one possible implementation of ZipFileInputFormat i found via google) as to whether he can roll the update for you

查看更多
登录 后发表回答