I am new in both scala and cassandra . I know the connectivity of cassandra with java using hector . But I don\'t know how to connect cassandra through scala. I want a simple ex
There were some Scala projects that arose to support Cassandra connectivity, including cassie by Twitter, but they all seemed to die off.
Since you know Hector, if you have the Hector jars in your classpath, you can simply use the Hector API in Scala if you prefer.
For example, borrowing from the documentation, you could just do this:
val myCluster = HFactory.getOrCreateCluster("test-cluster","localhost:9160")
or
val template = new ThriftColumnFamilyTemplate[String, String](ksp, columnFamily, StringSerializer.get(), StringSerializer.get())
I wrote this freehand, so the syntax might be off, but you get the idea.