cassandra-3.0

Configuring Cassandra's TokenAware and LatencyAware policy together in C++ driver

一个人想着一个人 提交于 2021-02-10 16:20:54
问题 After reading about the different load balancing policies available(https://datastax.github.io/cpp-driver/topics/configuration/), it seems to me that for best performance,particularly in multi data-center cluster, token-aware and latency-aware policy should be used together('Performance Tips' section of the above mentioned article). As per my understanding(assuming replication factor > 1), when we'll use both of these policies together, then the client will calculate the hash of the primary

Configuring Cassandra's TokenAware and LatencyAware policy together in C++ driver

耗尽温柔 提交于 2021-02-10 16:09:44
问题 After reading about the different load balancing policies available(https://datastax.github.io/cpp-driver/topics/configuration/), it seems to me that for best performance,particularly in multi data-center cluster, token-aware and latency-aware policy should be used together('Performance Tips' section of the above mentioned article). As per my understanding(assuming replication factor > 1), when we'll use both of these policies together, then the client will calculate the hash of the primary

date column which is a text type in Cassandra.so I need a UDF to convert that text to timestamp so I can query on that column

三世轮回 提交于 2021-01-29 05:29:19
问题 I have writeen code like belo but getting error as below:- InvalidRequest: Error from server: code=2200 [Invalid query] message="Java source compilation failed: Line 1: java.util.String cannot be resolved to a type Line 1: Syntax error on token "Date", @ expected Line 4: SimpleDateFormat cannot be resolved to a type CREATE FUNCTION saumya.text2dt ( input text ) RETURNS NULL ON NULL INPUT RETURNS timestamp LANGUAGE java AS $$ java.text.ParseException java.text.SimpleDateFormat java.util.Date

Cassandra add node problem, failed; error='Cannot allocate memory' (errno=12)

妖精的绣舞 提交于 2020-11-29 09:21:26
问题 I have a cluster of cassandra (v3.11.4) with 14 nodes and I wanna to add a new node. The machine has 256GB memory and I set heap size (max and min) to 64GB . But I cannot add a new node due to memory error! What is the exact problem and What I need to do? The last line of logs are as follows: INFO [CompactionExecutor:1153] 2020-06-11 10:51:09,719 NoSpamLogger.java:91 - Maximum memory usage reached (20971520000), cannot allocate chunk of 1048576 INFO [Service Thread] 2020-06-11 10:51:10,339

Cassandra nodetool repair is getting stuck sometimes

那年仲夏 提交于 2020-08-10 18:48:43
问题 I am running nodetool repair -pr -full my_ks my_tbl in our Cassandra cluster(has two DCs). It sometimes hangs with below debug logs. It works after restarting the Cassandra process. Any hints on the root cause of this issue? DEBUG [GossipStage:1] 2020-07-13 14:04:22,818 FailureDetector.java:456 - Ignoring interval time of 2571566434 for /10.22.38.223 DEBUG [GossipStage:1] 2020-07-13 14:04:22,818 FailureDetector.java:456 - Ignoring interval time of 2495429260 for /10.22.38.26 DEBUG

cassandra lookup by list of primary keys in java

梦想的初衷 提交于 2020-07-30 03:08:47
问题 I am implementing a feature which requires looking up Cassandra by a list of primary keys. Below is an example data where id is primary key mytable id column1 1 423 2 542 3 678 4 45534 5 435634 6 2435 7 678 8 4564 9 546 Most of my queries a lookup by id, but for some special cases I would like to get data for a list of ids. The way I am currently doing is a follows: public Object fetchFromCassandraForId(int id); int ids[] = {1, 3, 5, 7, 9}; List<Object> results; for(int id: ids) { results.add