Created
April 26, 2012 15:41
-
-
Save lelayf/2500461 to your computer and use it in GitHub Desktop.
Pail test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns cloudwh.pail-test | |
(:import [backtype.hadoop.pail Pail PailSpec SequenceFileFormat])) | |
(def pail3 (Pail/create "/tmp/data3" | |
(PailSpec. "SequenceFile" | |
{SequenceFileFormat/TYPE_ARG SequenceFileFormat/TYPE_ARG_BLOCK | |
SequenceFileFormat/CODEC_ARG SequenceFileFormat/CODEC_ARG_GZIP}))) | |
(def tos (.openWrite pail3)) | |
(.writeObject tos (byte-array [(byte 1) (byte 2) (byte 3)])) | |
;; IllegalArgumentException SequenceFile doesn't work with GzipCodec without native-hadoop code! org.apache.hadoop.io.SequenceFile.createWriter (SequenceFile.java:386) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment