使用Mapreduce处理受密码保护的zip文件 [英] Processing password protected zip files using Mapreduce

查看:427
本文介绍了使用Mapreduce处理受密码保护的zip文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用Hadoop mapreduce处理密码保护的压缩文件。我能够使用ZipFileInputformat处理未受保护的zip文件。但它不支持密码保护的拉链。
是否有任何Java库提供对受密码保护的zip文件的流访问或提取zip文件(如果我可以使其字节内容可用)?

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.

推荐答案

假设您可以找到一个可以读取受密码保护的zip文件的java库(查看这篇博客的文章),你应该可以修改当前的ZipFileInputFormat来使用这个库,然后你只需要通过配置选项为每个zip文件配置密码(希望您没有太多文件,或者所有文件都使用相同的密码进行保护)。

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).

它应该很容易。尝试一下,如果遇到问题,请发布另一个问题 - 或询问输入格式的作者( https://github.com/cotdp/com-cotdp-hadoop 是我通过google发现的ZipFileInputFormat的一种可能的实现方式),他是否可以为你推出更新

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

这篇关于使用Mapreduce处理受密码保护的zip文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆