Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Phantom DSL for Cassandra actually connect?

I'd like to use the Phantom DSL for Cassandra from Scala. I've noted that it uses the Datastax Java driver underneath, but I don't see anything in the documentation about how to actually connect or configure a connection. The included tests use an embedded Cassandra, so that doesn't help. Are there any detailed examples or tutorials for this library?

like image 308
Isvara Avatar asked Oct 08 '14 02:10

Isvara


1 Answers

To run operations with Phantom "tables" you need to have implicit Session object in scope. One way to achieve that is CassandraConnector, and you can build connectors using ContactPoint. For instance you can use this example.

Or you can build your own way of initializing implicit Session.

Update

Additionally you can read about connectors in more depth on this blog post.

like image 184
Eugene Zhulenev Avatar answered Oct 22 '22 08:10

Eugene Zhulenev