cassandra-3.0

nodetool snapshot takes schema snapshot (backup) too?

北城余情 提交于 2019-12-24 09:57:53
问题 Cassandra doc mentions that "nodetool snapshot" command takes snapshot of table data. However, I am also able to see schema.cql and manifest.json file in my snapshot directory where all snapshot files are generated. Is this expected behavior? Also can I use this schema.cql file to restore the schema if needed? My cassandra version cqlsh> show version [cqlsh 5.0.1 | Cassandra 3.0.9 | CQL spec 3.4.0 | Native protocol v4] >nodetool version ReleaseVersion: 3.0.9 EDIT: Is it mandatory to use cql

How to set the downgrading policy in Cassandra using nodejs

﹥>﹥吖頭↗ 提交于 2019-12-24 09:48:56
问题 I am not sure about setting the policy 'DowngradingRetryPolicy' in nodejs using Cassandra. policies : { loadBalancing : new cassandra.policies.loadBalancing.RoundRobinPolicy, retry: new cassandra.policies.retry.IdempotenceAwareRetryPolicy(new cassandra.policies.retry.RetryPolicy()) } }); This is how I set the IdempotenceAwareRetryPolicy policy and it is working as expected but How to set the ' DowngradingRetryPolicy ' policy in Cassandra using nodejs For reference adding the ruby

Cassandra CodecNotFoundException: Codec not found for requested operation

淺唱寂寞╮ 提交于 2019-12-24 09:25:10
问题 I have an enum field that i want to map to a column in cassandra public enum MyEnum { Aa, Bb, Cc, } and here is how i registered it CodecRegistry myCodecRegistry = new CodecRegistry(); myCodecRegistry.register(new EnumOrdinalCodec<MyEnum>(MyEnum.class)); cluster = Cluster.builder().addContactPoint(cassandraHosts).withPort(cassandraPort).withCodecRegistry(myCodecRegistry).build(); i am able to connect to cassandra just fine. Here is a snippet of the model class public class MyModel {

4 node setup in cassandra is as same as 3 node setup

自作多情 提交于 2019-12-24 08:58:47
问题 I have a 4 node setup in Cassandra and decided to go with the following configuration, but ppl are saying this will be same as 3 node setup, So could somebody please give me a light and say why, Nodes = 3, Replication Factor = 2, Write Consistency = 2, Read Consistency = 1 Nodes = 4, Replication Factor = 3, Write Consistency = 3, Read Consistency = 1 As per my understanding, Nodes = 4, provide the two node failure, It is beneficial to have RF as '3' but ppl are saying RF = 2 will be same as

unable to figure out if my scripts executed correctly in embedded-cassandra

允我心安 提交于 2019-12-24 08:58:33
问题 I have created a unit-test which uses embedded-cassandra and executes some scripts. But I am not able to figure out if the scripts ran successfully or not. I see the following two prints (maybe because I have two statements). Is there a way to get the result of the execution and print it on the console. WARN c.d.d.c.Connection - /127.0.0.1:9042 did not send an authentication challenge; This is suspicious because the driver expects authentication (configured auth provider = com.datastax.driver

Cassandra sorting the results by non-clustering key

假装没事ソ 提交于 2019-12-24 06:03:44
问题 Our use case with Cassandra is to show top 10 recent visitors of a blogpost. Following is the Cassandra table definition CREATE TABLE blogs_by_visitor ( blogposturl text, visitor text, visited_ts timestamp, PRIMARY KEY (blogposturl, visitor) ); Now in order to show top 10 recent visitors for a given blogpost, there needs to be an explicit "order by" clause on timestamp desc. Since visted_ts isn't part of the clustering column in Cassandra, we aren't able to get this done. The reason for

Cassandra sorting the results by non-clustering key

人盡茶涼 提交于 2019-12-24 06:02:05
问题 Our use case with Cassandra is to show top 10 recent visitors of a blogpost. Following is the Cassandra table definition CREATE TABLE blogs_by_visitor ( blogposturl text, visitor text, visited_ts timestamp, PRIMARY KEY (blogposturl, visitor) ); Now in order to show top 10 recent visitors for a given blogpost, there needs to be an explicit "order by" clause on timestamp desc. Since visted_ts isn't part of the clustering column in Cassandra, we aren't able to get this done. The reason for

Issues in growing commit logs

不问归期 提交于 2019-12-24 04:01:30
问题 I have a machine the commit logs keeps increasing upto 7.8 GB and still growing, I checked a property commitlog_total_space_in_mb: 8192 which is commented in cassandra.yaml. I suspect it has to be the default. 1) What is the problem in growing commit log size? 2) Is it says my memtable treshold is not reached? EDITED : memtable_cleanup_threshold = 1/(memtable_flush_writers + 1) * (memtable_offheap_space_in_mb + memtable_heap_space_in_mb) where recommended values are, memtable_flush_writers -

Is there a way to use Facebook Presto 0.131 with Cassandra 3.0.0?

て烟熏妆下的殇ゞ 提交于 2019-12-23 18:11:06
问题 When querying a Cassandra 3.0.0 cluster using Presto 0.131 I get: All host(s) tried for query failed [..snip...] InvalidQueryException: unconfigured table schema_keyspaces I assume this is due to some change in Cassandra's system schemas? If so is there a workaround or should we wait for Presto to support Cassandra 3.0.0? 2016-11-05 Update : Newer versions of PrestoDB work fine with Cassandra 3+. Currently using 0.147 but the latest version is 0.156 and they all work fine with the new

Caused by: com.datastax.driver.core.exceptions.InvalidQueryException: Expected 8 or 0 byte long for date (13)

混江龙づ霸主 提交于 2019-12-23 17:33:15
问题 I am trying to insert data with spring-data-cassandra. But I am getting bellow error , when my app is running with SpringBoot(version is 1.5.3) I add a custom CallHistoriyRespority object implemented CrudResposity in spring-data, and use the save method to insert the data object I can't find any reason and the problem confused me Full stack trace : Caused by: com.datastax.driver.core.exceptions.InvalidQueryException: Expected 8 or 0 byte long for date (13) at com.datastax.driver.core