Cassandra1.2学习笔记

一、下载安装

http://blog.csdn.net/samoobook/article/details/9121167

二、集群搭建

http://blog.csdn.net/limingjian/article/details/8535600

三、调优

http://yunnick.iteye.com/blog/1635885

四、客户端选择

http://hi.baidu.com/diwulechao/item/b8de7ef0ef1deac6a935a20e

五、Java Driver 1.0 for Apache Cassandra

http://www.datastax.com/documentation/developer/java-driver/1.0/webhelp/index.html#java-driver/quick_start/qsSimpleClientAddSession_t.html

javaDriver DataTYPE

Java classes to CQL3 data types
CQL3 data type Java type
ascii java.lang.String
bigint long
blob java.nio.ByteBuffer
boolean boolean
counter long
decimal java.math.BigDecimal
double double
float float
inet java.net.InetAddress
int int
list java.util.List<T>
map java.util.Map<K, V>
set java.util.Set<T>
text java.lang.String
timestamp java.util.Date
timeuuid java.util.UUID
uuid java.util.UUID
varchar java.lang.String
varint java.math.BigInteger

   CQLDATA TYPE

CQL Data Types
CQL Type Constants Description
ascii strings US-ASCII character string
bigint integers 64-bit signed long
blob blobs Arbitrary bytes (no validation), expressed as hexadecimal
boolean booleans true or false
counter integers Distributed counter value (64-bit long)
decimal integers, floats Variable-precision decimal
double integers 64-bit IEEE-754 floating point
float integers, floats 32-bit IEEE-754 floating point
inet strings IP address string in IPv4 or IPv6 format*
int integers 32-bit signed integer
list n/a A collection of one or more ordered elements
map n/a A JSON-style array of literals: { literal : literal, literal : literal ... }
set n/a A collection of one or more elements
text strings UTF-8 encoded string
timestamp integers, strings Date plus time, encoded as 8 bytes since epoch
uuid uuids A UUID in standard UUID format
timeuuid uuids Type 1 UUID only (CQL 3)
varchar strings UTF-8 encoded string
varint integers Arbitrary-precision integer

*Used by python-cql driver and binary protocols.

六、异常

com.datastax.driver.core.exceptions.UnavailableException: Not enough replica available for query at consistency ONE (1 required but only 0 alive)

解决:https://issues.apache.org/jira/browse/CASSANDRA-5292

Bad Request: ORDER BY is only supported when the partition key is restricted by an EQ or an IN.

解决: http://stackoverflow.com/questions/18274007/select-2000-most-recent-log-entries-in-cassandra-table-using-cql-latest-version

七、keyspace的两种类型与snitch集群解疑

http://iteches.com/archives/8162

八、cql语法

http://cassandra.apache.org/doc/cql3/CQL.html

转载于:https://my.oschina.net/laigous/blog/169232

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值