一、下载安装
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
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 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.
七、keyspace的两种类型与snitch集群解疑
http://iteches.com/archives/8162
八、cql语法
http://cassandra.apache.org/doc/cql3/CQL.html