cassandra-CQL

describe keyspaces;

use falcon_gps;

select * from gps;

INSERT INTO gps (gprscode,gpstime,acc,alarmdes,direct,lat,lng,offset,posinfo,power,sendmodel,speed,status,statusdes,updatetime,vehicleid)
VALUES (‘xxd001‘,2,3,‘xxxxxx‘,5,6,7,8,‘‘,10,11,12,13,‘‘,15,16);

UPDATE gps SET alarmdes = ‘yyyyyyyyy‘
WHERE gprscode=‘xxd001‘ and gpstime =3;

delete FROM gps  WHERE gpstime = 3 AND gprscode=‘xxd001‘;

时间: 2024-08-27 17:19:59

cassandra-CQL的相关文章

cassandra CQL 3.0 怎样实现 dynamic column;

1. cassandra有一个好的特点是列之间可以按照column key进行排序:这样当rowkey确定以后,对于同一个“行”的范围(range query)查找是很方便的:官方说法,每一个“行”(wide row)可以加入最多20亿个列,虽说如此,据ebay的工程师讲,实践中也没有超过百万个的:同一个row的数据值存在于同一server,不会分开的: 2. 而且column 的模式不是预先固定的,可以随时增加和删除,这样其实不仅是column value,column key我们也可以利用上

过滤文本文档中的数据并插入Cassandra数据库

代码如下: package com.locationdataprocess; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; import java.sql.Connection;

设置cassandra用户名和密码

参考http://zhaoyanblog.com/archives/307.html 修改cassandra.yaml配置文件 把默认的 authenticator: AllowAllAuthenticator 改成 authenticator: PasswordAuthenticator 启动cassandra cql连接,cassandra是默认账户和密码 ./cqlsh -ucassandra -pcassandra ip port 创建用户 CREATE USER myusername

Cassandra 配制 cassandra.yaml

一.设置用户名和密码 修改cassandra.yaml配置文件 把默认的 authenticator: AllowAllAuthenticator 改成 authenticator: PasswordAuthenticator 如果你需要登陆进去以后查看修改权限之类,需要修改 authorizer: AllowAllAuthorizer 为 authorizer: CassandraAuthorizer 启动cassandra cql连接,cassandra是默认账户和密码 ./cqlsh -u

Cassandra 学习七 cassandra研究

https://www.cnblogs.com/bonelee/p/6306079.html Allow filtering: 如果你的查询条件里,有一个是根据索引查询,那其它非索引非主键字段,可以通过加一个ALLOW FILTERING来过滤实现: 虽然查询非索引非主键字段,但是只要加了ALLOW FILTERING条件,它会先根据索引查出来的值,再对结果进行过滤: (如果不加ALLOW FILTERING,而又有非索引列,这样是不允许的: 加上ALLOW FILTERING,相当于在结果后再

zato——Outgoing connections

每个服务可以使用一系列协议自动访问外部资源. 一些协议是同步的,而在其他的通信是异步执行. 注意总要把高可用性考虑在内,尤其是采用AMQP.JMS WebSphere MQ等输出连接. Protocol Synchronous AMQP — Cassandra CQL Yes ElasticSearch Yes FTP Yes HTTP Yes IMAP Yes JMS WebSphere MQ — Odoo (OpenERP) Yes SMTP Yes Solr Yes SQL Yes Zer

JanusGraph文档整理

目录 JanusGraph调研 结论 Intro Basics Configuration 数据模型(Schema) Gremlin JanusGraph Server 服务部署 ConfiguredGraphFactory Multi-node Indexing Transaction 事务 缓存机制(JanusGraph Cache) 事务日志(Transaction Log) 其他常见问题 技术上的限制(Technical Limitations) 后端存储(Storage Backend

Cassandra查询语言CQL的基本使用

在window环境下运行CQL语言要先安装python环境,在linux下不需要,cassandra内置了python. 1.查看python版本:python --version2.运行pythod:python ./cqlsh 一. CQL定义语句:keyspace:3.查看创建keyspace的相关帮助:help create keyspace;4.创建keyspace:create keyspace ks1 with replication = {'class':'SimpleStrat

NoSql之旅--Cassandra的Cql简介(二)

安装完Cassandra后我们就开始体验一下这个数据库的查询吧,传统的关系数据库使用的sql进行查询,而Cassandra使用的cql. cql语法还是很多的,这里不一一详细阐述了,也没这个必要,具体的文档数不胜数,这里只是把最最常用的查询功能列举出来. 首先打开命令行(或是powershell)进入Cassandra安装目录下的bin文件夹,执行cqlsh.bat(powershell下执行cqlsh也ok).这里我进入的是powershell. //进入cql客户端,powershell中直

Cassandra在CQL语言层面支持多种数据类型

Cassandra在CQL语言层面支持多种数据类型. CQL类型 对应Java类型 描述 ascii String ascii字符串 bigint long 64位整数 blob ByteBuffer/byte[] 二进制数组 boolean boolean 布尔 counter long 计数器,支持原子性的增减,不支持直接赋值 decimal BigDecimal 高精度小数 double double 64位浮点数 float float 32位浮点数 inet InetAddress i