如何将cassandra与zookeeper集成以支持事务 [英] how to integrate cassandra with zookeeper to support transactions

查看:730
本文介绍了如何将cassandra与zookeeper集成以支持事务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了Cassandra群集和Zookeeper服务器。现在我想使用zookeeper支持cassandra中的事务。我怎么做。

I have a Cassandra cluster and Zookeeper server installed. Now I want to support transactions in cassandra using zookeeper. How do i do that.

Zookeeper创建znode以执行读取和写入操作,数据来回Zookeeper中的znode。我想知道如何支持回滚和提交功能在cassandra使用Zookeeper。是否有任何方式,我们可以在zookeeper或zookeeper配置cassandra中指定cassandra配置。

Zookeeper creates znodes to perform read and write operations and data to and fro goes through znodes in Zookeeper. I want to know that how to support rollback and commit feature in cassandra using Zookeeper. Is there any way by which we can specify cassandra configurations in zookeeper or zookeeper configurations in cassandra.

我知道cassandra和zookeeper个别如何读取和写入数据,但我不知道如何使用Java集成两者。

I know cassandra and zookeeper individually how data is read and written but I dont know how to integrate both of them using Java.

如何使用Zookeeper进行Cassandra中的事务。

how can we do transactions in Cassandra using Zookeeper.

推荐答案


我安装了Cassandra群集和Zookeeper服务器。现在我想使用zookeeper支持cassandra中的事务。我该如何做。

I have a Cassandra cluster and Zookeeper server installed. Now I want to support transactions in cassandra using zookeeper. How do i do that.

很难。 Cassandra不能很好地作为一个事务系统。对多个行的写入不是原子的,如果一些写入失败,则无法回滚写入,并且没有办法确保读取器在阅读时读取一致的视图。

With great difficulty. Cassandra does not work well as a transactional system. Writes to multiple rows are not atomic, there is no way to rollback writes if some writes fail, and there is no way to ensure readers read a consistent view when reading.


我想知道如何使用Zookeeper在cassandra中支持回滚和提交功能。

I want to know that how to support rollback and commit feature in cassandra using Zookeeper.

Zookeeper不会帮助你,特别是提交功能。你可能能够写足够的信息给zookeeper在失败的情况下回滚,但如果你这样做,你也可以存储回滚信息在cassandra。

Zookeeper won't help you with this, especially the commit feature. You may be able to write enough information to zookeeper to roll back in case of failure, but if you are doing that, you might as well store the rollback info in cassandra.

当你使用Zookeeper作为锁定服务时,Zookeeper和Cassandra一起工作。查看 Cages 库。使用zookeeper协调对cassandra的读/写。

Zookeeper and Cassandra work well together when you use Zookeeper as a locking service. Look at the Cages library. Use zookeeper to co-ordinate read/writes to cassandra.

尝试使用cassandra作为事务系统,对多行和回滚的原子提交将非常令人沮丧。

Trying to use cassandra as a transactional system with atomic commits to multiple rows and rollbacks is going to be very frustrating.

这篇关于如何将cassandra与zookeeper集成以支持事务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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