cassandra

com.datastax.driver.core.exceptions.InvalidQueryException: unconfigured table user"

与世无争的帅哥 提交于 2021-01-28 09:55:13
问题 I am new to Cassandra and this has been giving me issues. I downloaded apache-Cassandra 3.11 and I am using spring boot 1.5.4.RELEASE. I did some research and found a source where it says it may be because Spring data is using a different Cassandra driver core version? But the latest uses cql 3 correct? I also made a java class configuration file. The issue may be here. import org.springframework.cassandra.config.CassandraCqlClusterFactoryBean; import org.springframework.cassandra.config

Cassandra Cluster why node shows UNREACHABLE?

风流意气都作罢 提交于 2021-01-28 09:07:30
问题 I have a Cassandra v3.9 cluster of 3 nodes on CentOS. Replication factor=2, replication strategy as networktopologystrategy, single data center. One of the nodes which is not a "seed" node, many times when I do "nodetool describecluster", shows as UNREACHABLE for some time, upto 10 min in some cases. After that it again shows up as normal node. At that time when I look at /var/log/cassandra/debug.log, I see following line on one of the seed nodes: "DEBUG [RMI TCP Connection(118)-127.0.0.1]

In Cassandra, how is it possible to save data in a column name while leaving the column value empty?

萝らか妹 提交于 2021-01-28 08:47:48
问题 I've seen it being written in multiple sources that it is perfectly normal, with Cassandra, to store data in the column name, while leaving the column value empty. I'm not sure I completely understand how that's possible. Can anyone throw more light on this, preferably with an example schema? 回答1: No, not any more. This used to be possible. It required the old (pre-3.x storage engine) and use of a Thrift-based API. But tables built with CQL (and the new storage engine) require all columns to

Data model in Cassandra and proper deletion Strategy

这一生的挚爱 提交于 2021-01-28 08:09:14
问题 I have following table in cassandra: CREATE TABLE article ( id text, price int, validFrom timestamp, PRIMARY KEY (id, validFrom) ) WITH CLUSTERING ORDER BY (validFrom DESC); With articles and historical price information (validFrom is a timestamp of new price). Article price changes often. I want to query for Historic price for a particular article. Last price for an article. From my understanding, I can solve both problems with following query: select id, price from article where id = X

DataStax Bulk Loader 1.7.0 for Apache Cassandra installation doesn't work on Ubuntu

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-28 07:50:34
问题 maybe this could be very helpful to other people. This is the link in which is explained the installatif DSbulk loader. https://docs.datastax.com/en/dsbulk/doc/dsbulk/install/dsbulkInstall.html Someone could explain step by step the procedure to install it? The first part in the link is very clear, but if you have installed JAVA (as in my case) when on terminal you run " dsbulk --version " it says "command not found". I hope this will be very helpful, there are no tutorials neither on youtube

Cassandra nodetool cfstats - Read Count is always 0

不羁岁月 提交于 2021-01-28 04:09:31
问题 I've got a problem with monitoring my Cassandra node. I ran nodetool cfstats keyspaceName.tableName Unfortunately Read Count is always 0 and Read Latency is NaN. I am doing reads and writes but only writes metrics are updated. Here is what I got as an output: Starting NodeTool Keyspace: realtimetrader Read Count: 0 Read Latency: NaN ms. Write Count: 402 Write Latency: 0.09648756218905473 ms. Pending Flushes: 0 Table: currencies SSTable count: 1 Space used (live): 5254 Space used (total): 5254

How the LWT- Light Weight Transaction is working when we use IF NOT EXIST?

会有一股神秘感。 提交于 2021-01-28 03:19:39
问题 The question is that, When we use INSERT INTO USERS (login, email, name, login_count) values ('jbellis', 'jbellis@datastax.com', 'Jonathan Ellis', 1) IF NOT EXISTS in IF NOT EXIST exactly which columns are compared together? primary key(partition-key + clustering-key)? or just partition-key? 回答1: Here is a diagram of the 4 phases of LWT: http://www.slideshare.net/doanduyhai/cassandra-introduction-nantesjug/89 The original blog post is here: http://www.datastax.com/dev/blog/lightweight

Cassandra truncate performance

主宰稳场 提交于 2021-01-27 20:28:59
问题 I have been recently told that, cassandra truncate is not performant and it is anti pattern. But, I do not know why? So, I have 2 questions: Is it more performant to have upsert of all records then doing truncate? Does truncate operation creates tombstones? Cassandra Version: 3.x 回答1: From the cassandra docs: Note: TRUNCATE sends a JMX command to all nodes, telling them to delete SSTables that hold the data from the specified table. If any of these nodes is down or doesn't respond, the

Does adding a column to a cassandra table complete instantly?

拈花ヽ惹草 提交于 2021-01-27 14:31:34
问题 We plan to add a column of type list to an existing cassandra table which data file size is about 350 GB. We can temporarily halt all the read/write for a few minutes while applying the schema change. Our understanding is that cassandra does not lock a table when applying schema changes, but to be sure our DBA wants to do an experiment on a table with datafile at 25 GB in size. However it will take 3-4 weeks to grow in such size on a small server where a non-production cassandra server is

OneToMany with @EmbeddedId and kundera

半城伤御伤魂 提交于 2021-01-27 13:42:00
问题 I have two class and I want to use OneToMany relation with EmbeddedId (Im working with kundera framework) my sensor entity class: public class SensorEntitie implements Serializable { @EmbeddedId private CompoundKey key; @Column private float temperature; @Column private float pressure; @OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.EAGER) @JoinColumn(name="what I should to put here") private List<PieceEntitie> pieces; } @Embeddable public class CompoundKey { @Column private