Permalink
Browse files

release 0.2.8: clj-hector.core/cluster now allows a sequence of hostn…

…ames when connecting to the cluster
  • Loading branch information...
1 parent 09f82a5 commit 3b14042dc11dddecf64ea867128ca2dfc1c5cf5f @pingles committed Dec 5, 2012
Showing with 2 additions and 3 deletions.
  1. +1 −1 project.clj
  2. +1 −2 src/clj_hector/core.clj
View
@@ -1,4 +1,4 @@
-(defproject org.clojars.paul/clj-hector "0.2.7"
+(defproject org.clojars.paul/clj-hector "0.2.8"
:dependencies [[org.hectorclient/hector-core "1.1-2"]
[org.slf4j/slf4j-api "1.6.1"]
[org.clojure/clojure "1.4.0"]
@@ -20,15 +20,14 @@
(def type-inferring (TypeInferringSerializer/get))
(defn cluster
- "Connects to Cassandra cluster"
+ "Connects to Cassandra cluster. Host can be a sequence of hostnames, or a single hostname."
([cluster-name host]
(cluster cluster-name host 9160))
([cluster-name host port]
(cluster cluster-name host port (CassandraHostConfigurator. )))
([cluster-name host port configurator]
(cluster cluster-name host port configurator {}))
([cluster-name host port configurator credentials]
- ; accept a sequence of hosts
(let [host-str (if (sequential? host)
(string/join "," (map #(str % ":" port) host))
(str host ":" port))]

0 comments on commit 3b14042

Please sign in to comment.