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 ...
随机推荐
- Dubbo服务集群,常见容错机制:failover ,failsafe,failfase ,failback,forking
http://blog.csdn.net/hongweigg/article/details/52925920 http://m.blog.csdn.net/article/details?id=51 ...
- windows 安装 Redis
本文安装的是 免安装版本: 1: https://github.com/MicrosoftArchive/redis/releases 下载Redis-x64-3.2.100.zip 设置密码 red ...
- SIFT算法详解(转)
原文地址 http://blog.csdn.net/pi9nc/article/details/23302075 尺度不变特征变换匹配算法详解 Scale Invariant Feature Tran ...
- 【字符串题目】poj 3096 Surprising Strings
Surprising Strings Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6193 Accepted: 403 ...
- mysql七:视图、触发器、事务、存储过程、函数
阅读目录 一 视图 二 触发器 三 事务 四 存储过程 五 函数 六 流程控制 一 视图 视图是一个虚拟表(非真实存在),其本质是[根据SQL语句获取动态的数据集,并为其命名],用户使用时只需使用[名 ...
- openfire XML流
XML流 概览 两个基本概念,XML流和XML节,使得在出席信息已知的实体之间,异步交换低负载的结构化信息成为可能.这两个术语定义如下: XML流的定义:一个XML流是一个容器,包含了两个实体之间通过 ...
- 跨线程send message
今天同事问了一个问题,说在线程中send message 和直接调用是不是一样,他觉得是一样的,但是线程跟踪却发现处理过程是在接收消息队列完成.回家看到博客园上的一番争论才有些明白,这里贴出来,共勉 ...
- Linux 文本的^M问题
很多人在windows中使用文本编辑器编辑好文本后,传送到linux系统后,使用vi工具打开后发现每一行文本最后都有一个^M号,原因是: 在DOS使用的换行符为 \r\n,我们称为CR(\r)与LF( ...
- mysql修改初始密码
通过MySQL命令行,可以修改MySQL数据库的密码,下面就为您详细介绍该MySQL命令行,如果您感兴趣的话,不妨一看. 格式:mysqladmin -u用户名 -p旧密码 password 新密码 ...
- 「LuoguP1144」 最短路计数(dijkstra
题目描述 给出一个NN个顶点MM条边的无向无权图,顶点编号为1-N1−N.问从顶点11开始,到其他每个点的最短路有几条. 输入输出格式 输入格式: 第一行包含22个正整数N,MN,M,为图的顶点数与边 ...