Skip to content

Instantly share code, notes, and snippets.

@sritchie
Created August 5, 2011 20:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sritchie/1128401 to your computer and use it in GitHub Desktop.
Save sritchie/1128401 to your computer and use it in GitHub Desktop.
(defmacro with-serializations
[serial-vec & forms]
`(with-job-conf
{"io.serializations"
~(->> serial-vec
(map #(if (string? %) % (.getName %)))
(concat ["cascading.tuple.hadoop.BytesSerialization"
"cascading.tuple.hadoop.TupleSerialization"
"org.apache.hadoop.io.serializer.WritableSerialization"])
(join ","))}
~@forms))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment