cassandra-3.0

Cassandra driver(datastax) load balancing with TokenAwarePolicy

北慕城南 提交于 2019-12-25 07:27:11
问题 My question is a follow up of this topic : Cassandra load balancing with TokenAwarePolicy and shuffleReplicas I'm encountering some issues regarding the TokenAwarePolicy that I don't understand. Cluster configuration : 3 nodes Replication factor = 3 Load balancing policy : new TokenAwarePolicy(new RoundRobinPolicy(), false) Consitancy level (Reads/Writes) : ONE Shuffling replicas is set to false on purpose. But the thing is that I'm encountering consistency problems when reading datas in my

Why Cassandra TableWriter writing 0 records and how to fix it?

旧城冷巷雨未停 提交于 2019-12-25 03:24:49
问题 I am trying to write an RDD into a Cassandra table. As shown below TableWriter wrote 0 rows several times and finally writes to Cassandra. 18/10/22 07:15:50 INFO TableWriter: Wrote 0 rows to log_by_date in 0.171 s. 18/10/22 07:15:50 INFO Executor: Finished task 4.0 in stage 0.0 (TID 4). 622 bytes result sent to driver 18/10/22 07:15:50 INFO TableWriter: Wrote 0 rows to log_by_date in 0.220 s. 18/10/22 07:15:50 INFO Executor: Finished task 1.0 in stage 0.0 (TID 1). 665 bytes result sent to

Pagination in apache cassandra

断了今生、忘了曾经 提交于 2019-12-25 01:55:47
问题 How is the pagination achieved in Cassandra, I understand by sending the last received timestamp we will be able to achieve it. Apart from that is there any other way to achieve the Pagination in Cassandra? Also, Using timestamp has the limitation that it will help us paginate only in the insert order. 回答1: There is a notion of page state that you can pass when executing query, and query will return results starting with "known state". NodeJS driver exposes as pageState property of the result

Cassandra tuning for Request timed out

試著忘記壹切 提交于 2019-12-25 01:08:49
问题 I am using Apache Cassandra as a data store for one of my project, It is a single node and running smoothly for 4 to 5 hours then I started getting the Request timed out error . I observed the following in the last week and tuned all 1) GC pause was taking a long time and I tuned the GC pause and currently it is not even taking 2 seconds. PF the GC logs for reference : https://files.fm/u/h8b2mnwm#_ 2) Memory is not even using above 5GB of 8GB allocated 3) CPU with 8 cores seems fine. If

Cassandra: Delete Works on Local But Not On Deployed

久未见 提交于 2019-12-24 23:18:17
问题 Our service is able to run SELECT and INSERT queries without any issues on our local and deployed Cassandra instances. However, we are having trouble with the following DELETE query: DELETE FROM config_by_uuid WHERE uuid = record_uuid; Our service is able to successfully delete a record on our local instance, but not on our deployed instance. Note that this behavior is constant for both instances, and that that no errors are being reported on our deployed instance. Notably, when the above

Getting BusyPoolException com.datastax.spark.connector.writer.QueryExecutor , what wrong me doing?

╄→гoц情女王★ 提交于 2019-12-24 20:53:29
问题 I am using spark-sql-2.4.1 ,spark-cassandra-connector_2.11-2.4.1 with java8 and apache cassandra 3.0 version. I have my spark-submit or spark cluster environment as below to load 2 billion records. --executor-cores 3 --executor-memory 9g --num-executors 5 --driver-cores 2 --driver-memory 4g Using following configurration cassandra.concurrent.writes=1500 cassandra.output.batch.size.rows=10 cassandra.output.batch.size.bytes=2048 cassandra.output.batch.grouping.key=partition cassandra.output

Data Re-Partitioning in Cassandra

六月ゝ 毕业季﹏ 提交于 2019-12-24 19:26:51
问题 As a follow up of this Data Partition in Cassandra, I got the idea of the vNodes. Thanks to 'Simon Fontana Oscarsson' When I try to explore the data partitioning using vNodes, I have few questions, I try to observe the partition distribution in 2 node ( ./nodetool ring ) Two seed nodes (2 node) 172.30.56.61 rack1 Up Normal 105.19 KiB 100.00% -9207297847862311651 172.30.56.61 rack1 Up Normal 105.19 KiB 100.00% -9185516104965672922 172.30.56.61 rack1 Up Normal 105.19 KiB 100.00%

Using MetricsServlet to fetch metrics in Cassandra

社会主义新天地 提交于 2019-12-24 18:13:25
问题 I want to fetch various metrics like read/write latency, disk utilisation etc. of each of my Cassandra nodes(without using JMX) as a JSON object. It seems to me that MetricsServlet, can do exactly that. However, I'm still not able to figure out, what all do I need to do in order to use it(metrics-servlets does not come with Cassandra). I'll appreciate if I can get some advice/sample code(for fetching any metric). 回答1: Cassandra is not a java web server, it doesnt support servlets. You would

Manual Pagination in Cassandra

≡放荡痞女 提交于 2019-12-24 18:00:24
问题 I use the manual pagination feature in Cassandra. client.eachRow(query, params, options, function (n, row) { // Invoked per each row in all the pages console.log("row",row); }, function (err, result) { if(typeof result !== undefined) { pageState = result.pageState; console.log("pagestate output : ", pageState); if(pageState != null) { // } } } ); Say we have 4 row / entries in a table 'test'. When I try to query with fetchsize as '2' It returns two entres with result.pageState then I used the

Cassandra CQL 3.11 - How to use group by?

被刻印的时光 ゝ 提交于 2019-12-24 10:45:51
问题 How to use group by clause in Cassandra 3.11 ? I followed this link - Group by in CQL for Cassandra DB not working although the answer is accepted but when I created the same table and run the query , it is showing different result (not as expected) the steps I followed are - create table hashtags( id uuid, texts text, frequence int, primary key ((texts), frequence, id)) with clustering order by (frequence desc, id asc); then inserted some dummy data - after that run following query - select