cassandra的命令
cassandra的命令:
connect <hostname>/<port> (<username> '<password>')?; Connect to thrift service.
use <keyspace> [<username> 'password']; Switch to a keyspace.
describe keyspace (<keyspacename>)?; Describe keyspace.
exit;
quit;
describe cluster; Display information about cluster.
show cluster name; Display cluster name.
show keyspaces; Show list of keyspaces.
show api version; Show server API version.
create keyspace <keyspace> [with <att1>=<value1> [and <att2>=<value2> ...]];
update keyspace <keyspace> [with <att1>=<value1> [and <att2>=<value2> ...]];
create column family <cf> [with <att1>=<value1> [and <att2>=<value2> ...]];
update column family <cf> [with <att1>=<value1> [and <att2>=<value2> ...]];
drop keyspace <keyspace>; Delete a keyspace.
drop column family <cf>; Delete a column family.
get <cf>['<key>']; Get a slice of columns.
get <cf>['<key>']['<super>']; Get a slice of sub columns.
get <cf> where <column> = <value> [and <column> > <value> and ...] [limit int];
get <cf>['<key>']['<col>'] (as <type>)*; Get a column value.
get <cf>['<key>']['<super>']['<col>'] (as <type>)*; Get a sub column value.
set <cf>['<key>']['<col>'] = <value> (with ttl = <secs>)*; Set a column.
set <cf>['<key>']['<super>']['<col>'] = <value> (with ttl = <secs>)*;
Set a sub column.
del <cf>['<key>']; Delete record.
del <cf>['<key>']['<col>']; Delete column.
del <cf>['<key>']['<super>']['<col>']; Delete sub column.
count <cf>['<key>']; Count columns in record.
count <cf>['<key>']['<super>']; Count columns in a super column.
truncate <column_family>; Truncate specified column family.
assume <column_family> <attribute> as <type>;
Assume a given column family attributes to match a specified type.
consistencylevel as <level>;
Change the consistency level for set,get, and list operations.
list <cf>; List all rows in the column family.
list <cf>[<startKey>:];
List rows in the column family beginning with <startKey>.
list <cf>[<startKey>:<endKey>];
List rows in the column family in the range from <startKey> to <endKey>.
list ... limit N; Limit the list results to N.
cassandra的命令的更多相关文章
- Cassandra学习&命令行实践
准备 按照Cassandra集群部署搭建两台测试机,环境信息如下: 名称 IP 数据中心名称 node-01 192.168.198.130 datacenter1 node-02 192.168.1 ...
- cassandra 环境搭建
1 下载安装包 http://www.planetcassandra.org/cassandra/?dlink=http://downloads.datastax.com/community/dsc- ...
- Cassandra 的启动和初始化
Cassandra常用命令 Cassandra启动过程详解[原创] Cassandra 的入口 CassandraDaemon 作为Cassandra的入口,做了以下几件事: load configu ...
- 转】R利剑NoSQL系列文章 之 Cassandra
原博文出自于: http://blog.fens.me/category/%E6%95%B0%E6%8D%AE%E5%BA%93/page/3/ 感谢! R利剑NoSQL系列文章 之 Cassandr ...
- Cassandra 简介
Cassandra是云原生和微服务化场景中最好的NoSQL数据库.我信了~ 1. Cassandra是什么 高可用性和可扩展的分布式数据库 Apache Cassandra™是一个开源分布式数据,可提 ...
- hadoop+海量数据面试题汇总(一)
hadoop面试题 Q1. Name the most common InputFormats defined in Hadoop? Which one is default ? Following ...
- cassandra命令
压力测试:cassandra-stress [command] -node [nodes] -mode thrift user=[user] password=[password] example: ...
- Cassandra 数据库, python cqlsh命令
★ cql操作数据库(cqlsh.bat: python cqlsh命令操作<优缺点:https://blog.csdn.net/vbirdbest/article/details/77662 ...
- Cassandra命令行CLI的基本使用
启动cassandra-cli服务之后,可以进行CQL的使用. 1. 创建keyspace 可以理解成关系数据库的database [default@testkeyspace] create keys ...
随机推荐
- 【题解】CF891CEnvy
[题解] CF891C Envy 很好玩的一道题.尽管不难,但是调了很久QAQ 考虑克鲁斯卡尔最小生成树的算法,可以发现这些最小树生成的性质: 当生成树所有边的权值都\(\le\)某个$ w$的时刻, ...
- 链表的C++实现
有的时候,处于内存中的数据并非连续的.那么这时候.我们就须要在数据结构中加入一个属性.这个属性会记录以下一个数据的地址.有了这个地址之后.全部的数据就像一条链子一样串起来了,那么这个地址属性就起到 ...
- Android Development Note-02
输入框左侧的logo:android:drawableleft 弹出提示: Toast.makeText(this,"提示",Toast.LENGHT_LONG).show() ...
- Database: index
The whole point of having an index is to speed up search queries by essentially cutting down the num ...
- valgrind报错VEX temporary storage exhausted
valgrind的使用请参考: 使用valgrind进行内存泄漏和非法内存操作检测 最近在使用valgrind进行内存泄漏检测是时,竟然报错,如下: VEX temporary storage exh ...
- python列表切片
Python中符合序列的有序序列都支持切片(slice),例如列表,字符串,元组. 格式:[start:end:step] start:起始索引,从0开始,-1表示结束 end:结束索引 step:步 ...
- LeetCode-5:Longest Palindromic Substring(最长回文子字符串)
描述:给一个字符串s,查找它的最长的回文子串.s的长度不超过1000. Input: "babad" Output: "bab" Note: "aba ...
- PHP实现简单爬虫-抓取网页url
<?php /** * 爬虫程序 -- 原型 * * 从给定的url获取html内容 * * @param string $url * @return string */ function _g ...
- bzoj 2067 [Poi2004]SZN——二分+贪心
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=2067 最少的线段可以贪心地想出来.(结果还是写错了)就是偶数孩子可以自己配对,奇数孩子要带一 ...
- hdu3037Saving Beans——卢卡斯定理
题目:http://acm.hdu.edu.cn/showproblem.php?pid=3037 卢卡斯定理模板——大组合数的取模 代码如下: #include<iostream> #i ...