cassandra

时序数据库 Apache-IoTDB 源码解析之前言(一)

偶尔善良 提交于 2020-02-25 19:06:06
IoTDB 是一款时序数据库,相关竞品有 Kairosdb , InfluxDB , TimescaleDB 等,主要使用场景是在 物联网 相关行业,如:车联网、风力发电、地铁、飞机监控等等,具体应用案例及公司详情可以查看: IoTDB在实际公司中的使用信息收集 IoTDB 模块主要分为 Client , JDBC , Server , TsFile , Grafana , Distribution 以及各种生态的 连接器 。整个系列的文章会从行业背景开始讲起,了解一个行业具体的使用场景,然后介绍 TsFile 是以什么样的格式来保存数据的,再介绍 Server 里怎样完成一次查询,最后在介绍一条完 整的 SQL 是怎样从 Client 使用 JDBC 到 Server 直至返回具体结果。如果有能力的话再介绍一下集群的一些内容和工作方式。 打一波广告本人专注车联网领域多年,现任四维智联架构师。目前正在参与 IoTDB 社区,有志同道合的同伴欢迎加微信: liutaohua001 欢迎大家访问 IoTDB 仓库 ,求一波 Star 。 这一章主要想聊一聊: 为什么重复造轮子,从物联网行业的数据特点到 IoTDB 的发展过程 这个轮子造的怎么样, IoTDB 和竞品测试对比 时序数据 我个人理解时序数据是基于时间维度的同一个物体或概念的值构成的一个序列数据。在传统关系型数据库中,例如

Is this type of counter table definition valid?

我是研究僧i 提交于 2020-02-25 09:01:52
问题 I want to create a table with wide partitions (or, put another way, a table which has no value columns (non primary key columns)) that enables the number of rows in any of its partitions to be efficiently procured. Here is a simple definition of such a table CREATE TABLE IF NOT EXISTS test_table ( partitionKeyCol timestamp clusteringCol timeuuid partitionRowCountCol counter static PRIMARY KEY (partitionKeyCol, clusteringCol) ) The problem with this definition, and others structured like it,

Is this type of counter table definition valid?

亡梦爱人 提交于 2020-02-25 09:01:37
问题 I want to create a table with wide partitions (or, put another way, a table which has no value columns (non primary key columns)) that enables the number of rows in any of its partitions to be efficiently procured. Here is a simple definition of such a table CREATE TABLE IF NOT EXISTS test_table ( partitionKeyCol timestamp clusteringCol timeuuid partitionRowCountCol counter static PRIMARY KEY (partitionKeyCol, clusteringCol) ) The problem with this definition, and others structured like it,

How to extract timestamp from UUID v1 (TimeUUID) using javascript?

旧巷老猫 提交于 2020-02-20 08:30:08
问题 I use Cassandra DB and Helenus module for nodejs to operate with this. I have some rows which contains TimeUUID columns. How to get timestamp from TimeUUID in javascript? 回答1: this lib ( UUID_to_Date ) is very simple and fast!! only used native String function. maybe this Javascript API can help you to convert the UUID to date format, Javascript is simple language and this simple code can help to writing API for every language. this API convert UUID v1 to sec from 1970-01-01 all of you need:

How to extract timestamp from UUID v1 (TimeUUID) using javascript?

邮差的信 提交于 2020-02-20 08:28:21
问题 I use Cassandra DB and Helenus module for nodejs to operate with this. I have some rows which contains TimeUUID columns. How to get timestamp from TimeUUID in javascript? 回答1: this lib ( UUID_to_Date ) is very simple and fast!! only used native String function. maybe this Javascript API can help you to convert the UUID to date format, Javascript is simple language and this simple code can help to writing API for every language. this API convert UUID v1 to sec from 1970-01-01 all of you need:

Why is Cassandra client failing without epoll in production? [duplicate]

我只是一个虾纸丫 提交于 2020-02-20 05:53:42
问题 This question already has an answer here : How to fix the “Found Netty's native epoll transport in the classpath, but epoll is not available. Using NIO instead” warning? (1 answer) Closed 2 years ago . When I run my service locally, I get a warning that epoll isn't available, so it's using NIO. Fair enough. When I deploy it in Kubernetes, I get this, which prevents the service from running: 2017-03-29T19:09:22.739482458Z 19:09:22.739 WARN com.datastax.driver.core.NettyUtil - Found Netty's

Why is Cassandra client failing without epoll in production? [duplicate]

假如想象 提交于 2020-02-20 05:53:03
问题 This question already has an answer here : How to fix the “Found Netty's native epoll transport in the classpath, but epoll is not available. Using NIO instead” warning? (1 answer) Closed 2 years ago . When I run my service locally, I get a warning that epoll isn't available, so it's using NIO. Fair enough. When I deploy it in Kubernetes, I get this, which prevents the service from running: 2017-03-29T19:09:22.739482458Z 19:09:22.739 WARN com.datastax.driver.core.NettyUtil - Found Netty's

实战-Cassandra之账号权限管理

时间秒杀一切 提交于 2020-02-12 15:00:12
密码认证器 默认的认证器是 org.apache.cassandra.auth.AllowAllAuthenticator。如果想要求客户端提供凭证,Cassandra提供另一种选择 org.apache.cassandra.auth.PasswordAuthenticatot 配置认证器 默认登录cqlsh不需要密码,修改cassandra.yaml 修改 # authenticator: AllowAllAuthenticator authenticator: PasswordAuthenticator Cassandra2.2或以后的版本,会看到使用 PasswordAuthenticator必须使用CassandraRoleManager,是Cassandra授权功能的一部分。 增加用户 修改之后登录提示需要账号密码,默认账号密码都是 cassandra [cassandra@node2 bin]$ ./cqlsh node2 Connection error: ('Unable to connect to any servers', {'192.168.56.12': AuthenticationFailed('Remote end requires authentication.',)}) [cassandra@node2 bin]$ ./cqlsh node2 -u

Cassandra SSTable工具详解

旧巷老猫 提交于 2020-02-08 20:21:23
在安装目录 /bin 和 tools/bin 目录中有很多工具可以直接处理一个 Cassandra 节点文件系统中的SSTable 数据文件。 这些文件的扩展名为 .db。 bin/sstableutil keyspace1 standard1: 工具可以列出对应指定表明的 SSTable 文件。 bin/sstableverify keyspace1 standard1: 检验对应table的SSTable文件,找出存在错误或数据破坏的文件。 bin/sstablescrub keyspace1 standard1: 可以更有效地从SSTable文件删除已破坏的数据。如果这个工具删除了已破坏的行,就需要运行一个修复。 bin/sstableloader: 如果拓扑,令牌区间或副本因子有任何变化,就需要使用loader工具加载数据。 tools/bin/sstablemetadata: tools/bin/sstableexpiredblockers: 工具会找出阻止删除一个SSTable的阻塞SSTable,这个类会输出阻塞其他SSTable被删除的所有SSTable,是你能确定为什么给定的SSTable还在磁盘上。 tools/bin/sstablelevelreset: 工具将一组给定SSTable的级别重置为0,这就要求下一个合并操作中要合并这些SSTable。

Key space name issue with creating table in cassandra

别来无恙 提交于 2020-02-08 07:10:53
问题 I have an existing key space 'emsSdk'. I need to create a table in the mentioned key space through java. So i followed the code using spark-cassandra-connector. Code is provided below ession.execute("CREATE TABLE emsSdk.activity (project_party_id TEXT, error_count TEXT," + " lock_version TEXT, record_status_id TEXT, error_type TEXT, error_message TEXT, file TEXT, release_stage_id TEXT, " + "line_no TEXT, uid TEXT PRIMARY KEY, activity_type_id TEXT, created_at TEXT," + "project_name TEXT,