Skip to content

Instantly share code, notes, and snippets.

View amitrathore's full-sized avatar

Amit Rathore amitrathore

View GitHub Profile
; What function can I put as FOO here to yield true
; Tried: hash-set, conj, concat
(defn kv [bag [k v]]
(update-in bag [k] conj v))
(defn mergeMatches [propertyMapList]
"Take a list of maps and merges them combining values into a set"
(defn capjure-insert
([object-to-save hbase-table-name row-id]
(capjure-insert object-to-save hbase-table-name row-id nil))
([object-to-save hbase-table-name row-id version-timestamp]
(let [#^HTable table (hbase-table hbase-table-name)
put (Put. (Bytes/toBytes row-id))
flattened (flatten object-to-save)]
(if version-timestamp
(do
(println "going to insert at:" version-timestamp " which is:" (class version-timestamp))