Home > hadoop-openpgp-codec

hadoop-openpgp-codec

Hadoop-openpgp-codec is a project mainly written in Java, it's free.

Codec for Hadoop adding OpenPGP encryption using Bouncy Castle

Hadoop OpenPGP Codec

Tommie Gannert [email protected] 2011-08-18

This project implements a org.apache.hadoop.io.compress.CompressionCodec for use in with Hadoop.

Created to upload encrypted files from the Flume logging framework into Amazon S3.

Currently, this is just a bunch of code written for testing purposes, not to be used in production. The decompression part has not been tested at all. The compressor outputs valid GPG files.

Usage

Build the package using Maven:

mvn package

Add target/*.jar target/lib/*.jar to the CLASSPATH of Hadoop, using hadoop-env.sh, or in the Flume case; flume-env.sh.

If you are using Oracle's JVM and you are not in the USA, you have to switch JCE policy files to enable strong encryption.

In the Hadoop configuration file, add a property io.compression.codecs with

org.apache.hadoop.io.compress.DefaultCodec,org.apache.hadoop.io.compress.GzipCodec,com.spotify.hadoop.openpgp.OpenPgpCodec

This casues files ending in .gpg to be automatically filtered through the codec.

To make Flume use it by default for the collector sinks, add `flume.collector.dfs.compress.codec'':

com.spotify.hadoop.openpgp.OpenPgpCodec

The various options used by the codec are global, and specified in the class documentation.

Documentation

Will be written if we decide to actually use it...

License

Distributed under the MIT license:


Copyright (c) 2011 Spotify Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.