Skip to content

Instantly share code, notes, and snippets.

@sorenmacbeth
Created October 4, 2011 21:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sorenmacbeth/1262872 to your computer and use it in GitHub Desktop.
Save sorenmacbeth/1262872 to your computer and use it in GitHub Desktop.
(ns hbase.cascalog.core
(:require [cascalog.workflow :as w])
(:import [cascading.hbase HBaseTap HBaseScheme ByteHolder]
[cascading.tuple Fields]
org.apache.hadoop.hbase.util.Bytes))
(defn hbase-tap [table-name key-field column-family & value-fields]
(let [scheme (HBaseScheme. (w/fields key-field) column-family (w/fields value-fields))]
(HBaseTap. table-name scheme)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment