Processing password protected zip files using Mapreduce [duplicate]

白昼怎懂夜的黑 提交于 2019-12-13 10:54:10

问题


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:


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



来源:https://stackoverflow.com/questions/19738929/processing-password-protected-zip-files-using-mapreduce

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!