如何将cassandra与zookeeper集成以支持事务

编程入门 行业动态 更新时间:2024-10-28 09:22:41
本文介绍了如何将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集成以支持事务

本文发布于:2023-11-24 08:21:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1624456.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何将   事务   cassandra   zookeeper

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!