jassandra 是否 支持 连接池 和 fail over?

7 views
Skip to first unread message

hzlinux

unread,
May 26, 2010, 9:35:51 AM5/26/10
to jassandra-user
jassandra 是否 支持 连接池 和 fail over?

Dop Sun

unread,
May 26, 2010, 11:00:01 AM5/26/10
to jassand...@googlegroups.com
Jassandra支持连接池,事实上这部分是用的Hector来实现的。

关于fail over,Hector是支持的,它的API是:
http://prettyprint.me/2010/03/03/load-balancing-and-improved-failover-in-hector/

CassandraClient client = pool.borrowClient(new String[] {"cas1:9160", "cas2:9160", "cas3:9160"});
如果你觉得这个功能你项目中需要,请新建一个Issue在Jassandra项目中,将你的需求写清楚,我可以将它加进去。

2010/5/26 hzlinux <hzl...@gmail.com>

Dop Sun

unread,
May 26, 2010, 11:15:20 AM5/26/10
to jassandra-user
事实上,我觉得这个功能应该加进去,现在想到的API是扩展connection URL:

目前,它的形式是:
thrift://host:port

扩展后:
thrift://host:port,host2:port2

即逗号分隔的的列表。

Dop Sun

unread,
May 26, 2010, 11:18:46 AM5/26/10
to jassandra-user
Issue 24 created for this.

Dop Sun

unread,
May 27, 2010, 9:42:48 AM5/27/10
to jassandra-user
Updated connection url definition can be found at:
http://code.google.com/p/jassandra/wiki/ConnectionUri

Dop Sun

unread,
May 27, 2010, 9:51:55 AM5/27/10
to jassandra-user
Released at: http://code.google.com/p/jassandra/

Download the 1.1.0 version with fail over support.

Reply all
Reply to author
Forward
0 new messages