在Java中连接和玩Cassandra [英] Connecting and playing with Cassandra in Java

查看:324
本文介绍了在Java中连接和玩Cassandra的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读了一些关于Cassandra的教程,它可以做什么,但我的问题是如何与Java中的Cassandra接口? (A tutorial will be nice :-))



如果可能,有人可以告诉我是否应该使用Thrift或Hector(哪一个更好,为什么) / p>

提前感谢。



PS 我可以将Hibernate与Cassandra集成吗? H> H> Hibernate使用JDBC驱动程序连接到关系数据库。 Cassandra是一个基于ColumnFamily的,它是一个关系数据库(分布式数据库)。



问题是找到一个合适的JDBC驱动程序。以下是Google Googled的一个项目:



http ://code.google.com/p/sql4d/



目前尚未启用,但您已找到如何找出正确的方法。



通过Hibernate进行对象关系映射,您不必担心Cassandra特定的方言,只需享受它。



好吧,这是理论上的声音。



另一种方法是使用Pelops库来使用Cassandra。更多信息 HERE



开始使用Cassandra - 一个相当短的帖子。



希望你能找到你的答案!


I have read some tutorials on what Cassandra is and what it can do but my problem is how to interface with Cassandra in java? (A tutorial will be nice :-) )

If possible, can someone please show me whether I should use Thrift or Hector (which one is better and why)?

Thanks in advance.

PS Can I integrate Hibernate with Cassandra?

解决方案

Hibernate uses JDBC Drivers to connect to relational databases. Cassandra is a ColumnFamily based, which is A relational database (distributed one).

The problem is to find a proper JDBC driver for your case. Here is a project I Googled:

http://code.google.com/p/sql4d/

It's not active currently, but you got the idea of how to find the right one.

Having object-relationship mapping through Hibernate you won't have to worry about the specific dialect Cassandra use and just enjoy the ride.

Well.. that's how it sounds theoretically.

Yet another way is using Pelops library for usage of Cassandra. More info on it HERE.

Getting started with Cassandra - a rather short post on the matter.

Hope you find of your answers there!

这篇关于在Java中连接和玩Cassandra的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆