cassandra

cassandra pagination: the difference between driver and CQL

女生的网名这么多〃 提交于 2020-01-15 11:44:06
问题 I am reading driver pagination in here. but CQL also support LIMIT in WHERE clause. Wonder what is the difference between these two 回答1: Pagination is how much you of your result you work with at a time. WHERE and LIMIT are about what is in your result. Imagine you request all rows where X < 100. This may refer to 1 million different rows. If the client or the server requested all of this at once it would cause a lot of resource pressure. To avoid this the driver is capable of asking for just

Unable to connect to cassandra from Docker container using spring-data-cassandra: NoHostAvailableException: All host(s) tried for query failed

折月煮酒 提交于 2020-01-15 10:48:07
问题 I am using spring-data-cassandra to connect to our cassandra db which is in aws cluster . Using CassandraTemplate I am able to connect locally and get the data but while deploying application in docker container I am getting below error UnsatisfiedDependencyException: Error creating bean with name 'cassandraTemplate' defined in class path resource [org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfiguration.class]: Unsatisfied dependency expressed through method

Unable to use cassandra counter column with cassandra gem

时间秒杀一切 提交于 2020-01-15 10:10:50
问题 I have created a column family by following command using cqlsh: create table mystats (key PRIMARY KEY, count counter); Now from the cqlsh I am able to increase the counter column but when I attempt to do this from cassandra gem, as adviced at: Are there any Ruby clients for Cassandra with counters and supercolumn? So when I use: @stats.add(:mystats, 'randomkey', 1, 'count') I get an error: Cassandra::AccessError at /client Invalid column family "mystats" When I further looked into it, I

Cassandra php driver on MacOS - Class 'Cassandra\SimpleStatement' not found

徘徊边缘 提交于 2020-01-15 09:35:08
问题 Good day, everyone. Usually I just using this Official Docs in *nix OS But now i'm using MacOs and this instructions just doesn't work properly. In case of pecl install cassandra I got this message: checking for supported DataStax C/C++ driver version... awk: can't open file /include/cassandra.h source line number 1 configure: error: not supported. Driver version 2.4.2+ required (found ) ERROR: `/private/tmp/pear/install/cassandra/configure --with-php-config=/usr/bin/php-config' failed My

How to make Cassandra fast

こ雲淡風輕ζ 提交于 2020-01-15 08:14:28
问题 I installed the Cassandra 2.0.0 on RedHat Linux using YUM. It's single node with the default setting. the Linux has 4 cores and 8G RAM. When I ran the following write/read single column family testing. the produced result seems pretty slow. Please advice how to make it fast. thanks. Each row has 100 columns. Cassandra Write Row Byte Time (ms) 2 110K 17 30 162K 170 100 540K 562 500 2700K 2459 1000 5408K 5570 2000 10797K 8707 4000 21583K 3975 9000 17799K 10600 Cassandra Read** It took 6.5

Cassandra high number of SSTables

送分小仙女□ 提交于 2020-01-15 05:39:25
问题 After launching some long running write jobs (batch insert from an Apache Spark Job with Spark Cassandra Connector), Cassandra (v. 2.1) created thousands of SSTables for the target table (more than 4500). The minor compaction thresholds are set to the default values (4 to 32). This means that, in theory, a lot of minor compaction tasks should be scheduled automatically. I checked the status and nodetool indicated that no tasks were being scheduled. I stopped doing any operation for few hours.

presto对接cassandra

最后都变了- 提交于 2020-01-15 00:58:16
因为业务需要而cassandra查询功能缺少全局排序,测试presto+cassandra查询的方案 测试时使用的cassandra版本为Cassandra 3.11.3 测试时使用的presto版本为presto-server-0.230 测试环境:三个cantos节点: 10.28.3.137 cluster1 localhost 10.28.3.142 cluster2 localhost 10.28.3.144 cluster3 localhost 1.下载和安装cassandra 因测试集群已经安装号cassandra服务,具体安装步骤请参考cassandra官网或者其他cassandra安装的博客 2.下载和安装presto 1.下载地址请前往presto官网 https://prestodb.io/download.html presto-server-0.230.tar.gz presto-cli-0.230-executable.jar 并上传至服务器/usr/local路径下 2.解压 tar -xzvf presto-server-0.230.tar.gz 解压后的目录为【presto-server-0.230】 3.配置 估摸这presto重点都在配置上了。。。。 3.1 首先在【presto-server-0.230】目录下创建【etc】文件夹

Restore cassandra cluster data when acccidentally drop table

这一生的挚爱 提交于 2020-01-14 22:47:32
问题 As you know, Cassandra cluster have replication to prevent data loss even if some node in the cluster down. But in the case that an admin accidentally drop a table with big amount of data, and that command had already executed by all the replica in cluster, is this means you lost that table and cannot restore it? Is there any suggestion to cope with this kind of disaster with short server down time? 回答1: From cassandra docs: auto_snapshot (Default: true ) Enable or disable whether a snapshot

Cassandra BETWEEN & ORDER BY operations

て烟熏妆下的殇ゞ 提交于 2020-01-14 16:48:06
问题 I wanted to perform SQL operations such as BETWEEN, ORDER BY with ASC/DSC order on Cassandra-0.7.8. As I know, Cassandra-0.7.8 does not have direct support to these operations. Kindly let me know is there a way to accomplish these by tweaking on secondary index? Below is my Data model design. Emp(KS){ User(CF):{ bsanderson(RowKey): { eno, name, dept, dob, email } prothfuss(RowKey): { eno, name, dept, dob, email } } } Queries: - Select * from emp where dept='IT' ORDER BY dob ASC. - Select *

Cassandra source code ConfigurationException expection URI in cassandra.config found cassandra.yaml

白昼怎懂夜的黑 提交于 2020-01-14 15:55:14
问题 For my master thesis, I have to modify the source code of Cassandra. So, as suggested by https://wiki.apache.org/cassandra/HowToBuild, I git clone, then run ant, and everything seems nice (I managed to build the project without any error), but when I run the unitTests (cassandra/test), I have this strange error: org.apache.cassandra.exceptions.ConfigurationException: Expecting URI in variable: [cassandra.config]. Found[cassandra.yaml]. Please prefix the file with [file:\\\] for local files