0

Can anyone recommend a good way to create scripts in java that will work with an older Cassandra 1.0.10 database? I'm having trouble finding stuff online. Is thrift a type of driver?

Thanks!

jj172
  • 611
  • 1
  • 7
  • 27

1 Answers1

2

Apache Thrift is way to connect to the Cassandra RPC server 1).

In the Cassandra source three there is a file /interface/cassandra.thrift which is an interface description file (IDL) that can be fed to the Apache Thrift compiler in order to generate Java code. By means of this Java code you will be able to access Cassandra. The whole process is described in more detail in the Cassandra wiki.

However, it is recommended to use a more high-level client library instead, because the raw Cassandra API is quite complex. You'll find the existing libraries, such as Hector, much more handy for your task.


1) Some more details about Thrift can be found in this answer.

Community
  • 1
  • 1
JensG
  • 12,102
  • 4
  • 40
  • 51
  • @jj172 You can find out what version of hector you want for cassandra 1.0.x from the [hector download page](https://github.com/hector-client/hector/downloads) on github. *P.S. We all wana say it... go for a newer version of Cassandra and dont shoot yourself in the foot*. – Lyuben Todorov Aug 07 '14 at 23:04