[转]Cassandra的 Consistency Level设置

写操作

级别内容ZEROEnsure nothing. A write happens asynchronously in backgroundANY(Requires 0.6) Ensure that the write has been written to at least 1 node, including hinted recipients.ONEEnsure that the write has been written to at least 1 node's commit log and memory table before responding to the client.QUORUMEnsure that the write has been written to <Replication> / 2 + 1 nodes before responding to the client.ALLEnsure that the write is written to all <Replication> nodes before responding to the client. Any unresponsive nodes will fail the operation.

读操作

级别内容ZERONot supported, because it doesn't make sense.ANYNot supported. You probably want ONE instead.ONEWill return the record returned by the first node to respond. A co
nsistency check is always done in a background thread to fix any consistency issues when ConsistencyLevel.ONE is used. This means subsequent calls will have correct data even if the
initial read gets an older ">value. (This is called read repair .)QUORUMWill query all nodes and return the record with the
most recent timestamp once it has at least a majority of replicas reported. Again, the remaining replicas will be checked in the background.ALLWill query all nodes and return the record with the most recent timestamp once all nodes have replied. Any unresponsive nodes will fail the operation.

时间: 2024-08-30 05:06:00

[转]Cassandra的 Consistency Level设置的相关文章

Cassandra数据库如何处理客户端请求

Cassandra集群中所有节点都是对等的,所以读/写操作可以发生在集群中的任意节点上,也许这个节点并没有需要读/写的数据,所以这个和用户交互的节点就成了coordinator节点. 单数据中心的写请求: 当客户端发送到coordinator节点上,则这个coordinator节点会吧这个写请求发送到集群内所有拥有目标行副本的节点上(target节点),比如: 更多精彩内容:http://www.bianceng.cnhttp://www.bianceng.cn/database/extra/

ASP.NET技巧:HTTP性能调优之设置连接失效时间

asp.net|技巧|性能 Setting Connection Timeouts设置连接失效时间 首先讲讲为什么要设置连接失效时间. Connection time-outs help reduce the loss of processing resources consumed by idle connections. When you enable connection time-outs, IIS enforces the time-outs at the connection lev

linux设置服务开机自启动的三种方式_Linux

这里介绍一下linux开机自动启动的几种方法,共计3种,大家可以借鉴一下!经验里面以centos 5.3系统为例! 方法1:.利用ntsysv命令进行设置,利用root登陆 终端命令下输入ntsysv 回车:如下图 在这个界面上进行操作即可,简要的操作说明: 括号中(*)代表默认开机启动,否则不会在开机的时候启动; 按钮功能: 上下键:可以在各个服务之间移动 空格键:设置启动还是不启动,*进行设置即可 Tab键:在方框.ok.cancle之间进行切换 F1键:进行帮助文档,如下图: 方法2:利用

Cassandra与HBase的大数据对决 谁是胜者?

在大数据这一全新的领域里,Bigtable数据库技术非常值得我们关注,因为这一技术是由谷歌的工程发明的,而谷歌是一家公认的非常擅长管理海量数据的公司.如果你对此非常了解,那么你一家知道也熟悉Cassandra和HBase这两个Apache数据库项目. 谷歌在2006年的一份研究报告中首次对Bigtable进行了阐述.有意思的是,这份报告当时并没有将Bigtable作为数据库技术,而是将其作为一种"稀疏的分布式多维度"映射技术以存储拍字节级数据,并在商用硬件上运行它们.行先是以一种非常独

SAP MM 特性设置问题导致PR审批策略不对之分析

SAP MM 特性设置问题导致PR审批策略不对之分析 笔者现在所在的项目里,采购申请的审批是在document level的,在配置里是启用了classification来支持审批策略.   PR release strategy 01-F1 配置:   PR release strategy 01-F2 配置:     现在创建了一个采购申请单据 3000000004,     单据类型是ZNB,工厂是3200,账户分配类别是F,     总金额是500000 CNY啊,为什么取到的relea

一个log4j的学习笔计

Log4j 学习笔记 by heavyz2003-04-15 转自:http://zooo.51.net/heavyz_cs/notebook/log4j.html -------------------------------------------------------------------------------- Log4j主页:http://jakarta.apache.org/log4j ----------------------------------------------

UNIX网络编程:套接字选项(SOL_SOCKET级别)

#include <sys/socket.h> int setsockopt( int socket, int level, int option_name,const void *option_value, size_t option_len); 第一个参数socket是套接字描述符. 第二个参数level是被设置的选项的级别,如果想要在套接字级别上设置选项,就必须把level设置为SOL_SOCKET. 第三个参数 option_name指定准备设置的选项,option_name可以有哪些

Ruby设计模式透析:单例(Singleton)

写软件的时候经常需要用到打印日志功能,可以帮助你调试和定位问题,项目上线后还可以帮助你 分析数据,但是Ruby原生带有的puts方法却很少在真正的项目开发中使用. 为什么作为Ruby新 手神器的puts,到了真正项目开发当中会被唾弃呢?其实只要细细分析,你就会发现它的很多弊端.比 如不可控制,所有的日志都会在项目上线后照常打印,从而降低运行效率:又或者不能将日志记录到本 地文件,一旦打印被清除,日志将再也找不回来:再或者打印的内容没有Tag区分,你将很难辨别这一 行日志是在哪个类里打印的. 你的

Java设计模式透析:单例(Singleton)

写软件的时候经常需要用到打印日志功能,可以帮助你调试和定位问题,项目上线后还可以帮助 你分析数据.但是Java原生带有的System.out.println()方法却很少在真正的项目开发中使用,甚至 像findbugs等代码检查工具还会认为使用System.out.println()是一个bug. 为什么作为Java 新手神器的System.out.println(),到了真正项目开发当中会被唾弃呢?其实只要细细分析,你就会 发现它的很多弊端.比如不可控制,所有的日志都会在项目上线后照常打印,从