Questions tagged [cassandra]

1

votes
0

answer
101

Views

Cassandra-stress does not generate random values for every row

With DDL and profile yaml below, I generate random data for my table using cassandra-stress. The results I get for the columns amount and status don't match expectation. The random values seem to be drawn once per partition, not for each row. If, for example, cassandra-stress generates 5 rows with t...
ankit
1

votes
1

answer
62

Views

SSTables row timestamps distribution messed up with TWCS

We're running Cassandra 2.1.14 and migrated to TWCS on one of our CFs a few months ago and since then, while getting better performance and avg SSTables read per query reduced drastically, we noticed old SSTables never get evicted. Running Cassandra's sstableexpiredblockers utility we see the reason...
sternr
1

votes
0

answer
184

Views

Cassandra Backup & Restore to another cluster

We want to clone production cluster to test cluster. On prod cluster, we did nodetool snapshot for keyspaces and restored on test cluster and used noedtool refresh and followed https://docs.datastax.com/en/cassandra/3.0/cassandra/operations/opsSnapshotRestoreNewCluster.html However, on test cluster,...
Sanjay
1

votes
0

answer
166

Views

Cassandra high cpu

I do have a cluster of 150 nodes, Cassandra 2.2.x, 8 cpu and 64 GB ram. From time to time couple of my nodes have 100 % cpu but the rest of the nodes looks just fine. When I have 100 % cpu: My tpstats No compactions are pending. INFO [Service Thread] 2018-05-12 18:03:51,636 GCInspector.java:284 - G...
Evgeni
1

votes
1

answer
84

Views

Using @ClusteringColumn and @Index in achilles cassandra on same column

I need to use same column as clustering column and secondary index. But achilles compilation fails. @Data @Builder @NoArgsConstructor @AllArgsConstructor @Table(table='users') public class Users{ @PartitionKey @Column private String userID; @Index(name = 'fname') @ClusteringColumn @Column private St...
user1589345
1

votes
1

answer
103

Views

Error while running the bemoss, I am getting AttributeError: 'gevent._event.AsyncResult' object has no attribute 'ident'

File 'src/gevent/greenlet.py', line 705, in gevent._greenlet.Greenlet.run File '/home/interview/BEMOSS3.5/volttron/platform/auth.py', line 147, in zap_loop time = gevent.core.time AttributeError: 'module' object has no attribute 'core' 2018-05-16T09:52:00Z
4

votes
1

answer
469

Views

Deploying Cassandra on ECS?

I'm trying to deploy Cassandra on AWS ECS as docker containers. Single nodes are easily done, but now I'm trying to make a cluster for it. Cassandra needs fixed ip addresses, at least for the seed nodes, which needs to be passed to all nodes in a cluster. Cassandra cannot work with ELB addresses,...
Denno
1

votes
1

answer
58

Views

Write C* timeout appeared in unpredictable way

We have same situation with lightweight-transaction, but i can't use retry because of bug in java driver Issue. https://datastax-oss.atlassian.net/browse/JAVA-1088 What i absolutely sure. My C* write timeout is 2 seconds(default) My cassandra is 9 node /16gb with EBS(GP2): and it does not overload....
Grigoriev Nick
1

votes
1

answer
146

Views

java.lang.RuntimeException: com.datastax.bdp.fs.model.NoSuchFileException: File not found: /tmp/hive/

I have following code : def main(args: Array[String]) { val conf = new SparkConf() .setAppName('Fleet') .set('spark.executor.memory', '1g') .set('spark.driver.memory', '2g') .set('spark.submit.deployMode', 'cluster') .set('spark.executor.instances', '4') .set('spark.executor.cores', '3') .set('spark...
Pinnacle
1

votes
1

answer
45

Views

tombstone warnings with data loaded using sstableloader

I am loading the data from one of my cassandra table to a new table with modified partition key. As a first step I took the dump of current table into a csv file. Afterwards I used CQLSSTableWriter to generate sstables as below. // Prepare SSTable writer CQLSSTableWriter.Builder builder = CQLSSTabl...
A N
1

votes
0

answer
111

Views

How to access Cassandra database in openshift

Hawkler metrics data is stored in Cassandra database in openshift. So, is all pods information stored in Cassandra? And are CPU usage, memory usage and network usage of all pods running in cluster stored in Cassandra database? How can I connect to this Cassandra database to get data? Or how can I...
samar
1

votes
0

answer
47

Views

How to query “OR” on one field for multiple values in cassandra with java

I'm using Cassandra query with java to find out all the students with names John and James who have got 80 marks. My Entity is: @Table(value='student') public class Student{ @PrimaryKey private String id; private String name; private double marks; //getters and setters } Query for finding the names(...
Iti Gupta
1

votes
1

answer
38

Views

Cassandra db PHP driver, cannot page queries with both ORDER BY and a IN restriction on the partition key

I cant get results for the following query using datastax PHP driver, select * from track where id='35209' and day in (20180314,20180315,20180316) and datetime < '2018-03-15 11:00:00' order by datetime desc limit 1; error message : 'Cannot page queries with both ORDER BY and a IN restriction on the...
badr bo
1

votes
1

answer
281

Views

VARINT vs BIGINT in cassandra

I want to know when to use VARINT instead of BIGINT? What is the limitation of each of them and how much space is being used by VARINT?
Mehdi Pourfar
1

votes
1

answer
572

Views

Cassandra Repository is always using keyspace from application.properties file not from the extended class of AbstractCassandraConfiguration

I have my data are on different keyspaces, i have more than one keyspace in a spring boot application, so i want my cassandra repositories to be configurable with different keyspaces each rather than having one keyspace in application level. In a spring project, i am looking something like a keyspac...
Prabu Subra
1

votes
0

answer
75

Views

Cannot get Xandra running with Cassandra 3

I try to work with the Elixir/Xandra library (https://github.com/lexhide/xandra) I have issues setting it up properly. Here my iex shell session: defmodule MyApp.CassandraAuth do @behaviour Xandra.Authenticator def response_body(options) do ['user:', 'cassandra', '_password:', 'cassandra'] end end {...
Stoecki
1

votes
1

answer
386

Views

Getting UnsatisfiedDependencyException intermittently for repository

In my project I have created a repository interface by implementing CrudRepository. My underlying DB is Cassandra. I am intermittently getting below error and my application is failing to start - org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userHel...
Saurabh
1

votes
0

answer
259

Views

Clearing prepared statement cache in cassandra 3.0.10

We have cassandra 3.0.10 installed on centos. The developers made some coding mistakes on preparing statements. The result is that the prepared statement cache is overrunning and we always get evicted error message. The error is shown below: INFO [ScheduledTasks:1] 2017-12-07 10:38:28,216 QueryProce...
sphynxnz
1

votes
1

answer
182

Views

Python cassandra driver Readtimeout

Every time I try to get query using the cassandra python driver, I will receive such an exception: **File 'something.py', line 32, in rows = session.execute('some query execution', timeout=None) File 'C:\Anaconda2\lib\site-packages\cassandra\cluster.py', line 2141, in execute return self.execute_as...
Andy Chang
1

votes
1

answer
64

Views

Cassandra: Writing binary blob to table with node.js

I am trying to have my node.js app read a file and then add it to a table but I can not figure it out. Here is the table info CREATE TABLE tracking.tracking_data ( first_name text, last_name text, timestamp timestamp, heat double, location text, m blob, speed double, telepathy_powers int, PRIMARY K...
Phillip Tribble
1

votes
1

answer
744

Views

Cassandra update multiple rows based on condition

I want to update multiple rows in Cassandra if they satisfy my condition with same value(changing flag to false) and my condition field is part of my composite key. But I cannot use whole composite key.
Vipul Fadte
1

votes
0

answer
46

Views

Data Model for One To Many - Itemcontainer in Cassandra

i have two CFs 'ItemContainer' and 'Items'. I used to have a secondary index in 'Items' referring to the 'Itemcontainer'. Something like: CREATE table items (key uuid primary key, container uuid, slot int .... CREATE INDEX items_container ON items(container) i change the 'container' cell quite often...
Malte Krüger
1

votes
0

answer
46

Views

Spark Cassandra connector - using IN for filtering with dynamic data

Let's assume that I have an RDD with items of type case class Foo(name: String, nums: Seq[Int]) and a table my_schema.foo in Cassandra with a partitioning key composed of name and num columns Now, I'd like to fetch for each element in the input RDD all corresponding rows, i.e. something like: SELECT...
jfu
1

votes
1

answer
108

Views

Cassandra CQL query giving error with ORDER BY ASC and LIMIT

I have created a Cassandra table with below configuration : CREATE TABLE 'ABC' ( subsector text, marketcapital decimal, id text, PRIMARY KEY (subsector, marketcapital, id) ) WITH CLUSTERING ORDER BY ( marketcapital DESC, id ASC ) CQL query giving error on running in Datastax dev center : select * fr...
Mehul Gupta
1

votes
0

answer
46

Views

Unwanted KEY column while moving code from thrift to CQL

We are running Datastax Enterprise 4.8.8 We have multiple applications connecting to Cassandra using Hector APIs(Thrift Communication). As a part of moving from Thrift communication to CQL Communication(using Datastax Cassandra Drivers): I see a strange error: an extra KEY column is added in my Col...
Anil Kapoor
1

votes
0

answer
62

Views

Unable to install Cassandra Driver on mac

I am trying to install the cassandra driver on my mac but every time I try: $sudo pip install cassandra-driver it throws an error of The directory '/Users/jigarmehta/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the...
Jigar Mehta
1

votes
1

answer
35

Views

why wouldn't Cassandra allow querying/filtering on columns without secondary indices even when primary key is specified

Before creating an Cassandra improvement ticket, I am curious what is the technical limitation to not allow column querying without secondary indices on them even when entire Primary Key (partition_key and clustering_key) is specified? With the PK, Cassandra is already at the specific partition row...
kisna
1

votes
0

answer
63

Views

Pushdown filter for Cassandra in Spark Cassanda Connector for SQL sub query - Custom Catalyst Rule?

I am using Spark Cassandra Connector using Spark Thrift server to enable SQL query on Cassandra database. Most of the SQL query works on Cassandra Partition Key with PushBack filter except SQL sub query. If I hit this query as below, I don't see Push down filter to Cassandra. Sample SQL SELECT query...
Awadhesh Kumar
1

votes
0

answer
27

Views

Cassandra connection pool not working inside the fork - C++

We have a C++ Web Service which does data processing and DB is Cassandra. The Web Service reads the request and fork the child and does the action. We need to pool Cassandra connection and cassandra document says, the driver could pool the connection if the session, cluster and keyspace are same. To...
Liju Mathew
1

votes
0

answer
68

Views

How does data retrieval happen in KairosDb?

I have data like below:- data = [ { 'name': 'test4', 'datapoints': [ [currentTimestamp, count] ], 'tags': { 'name' : 'MyName', 'dept' : 'Engineering', 'city' : 'Delhi', 'state': 'Delhi', 'country' : 'India' } } ] And I am sending data to KairosDB server by using python script like this - response =...
Rajendra Jangir
1

votes
1

answer
936

Views

Cosmos DB APIs performance comparison

I started to research Azure Cosmos DB and figured out that Cassandra API is not in GA yet. Although I'm generally interested in Cassandra API, I'm also trying to figure out how Cosmos DB works so I could possibly find a way how to use existing APIs for my needs. What I understood from the official d...
myarotskaya
1

votes
0

answer
133

Views

DataFrame and RDD count method returns different size for every query. Why?

There is a cassandra table and I get it by DF and RDD so as to count row. But count method returns different size for every process of counting. Why ? How can I get consistent and true result ? val productDF= spark.read.format('org.apache.spark.sql.cassandra').options(Map('keyspace' -> 'test', 'tabl...
Ozturk
1

votes
0

answer
28

Views

titan-cassandra 1.0.0 with guava 25.0-jre fails

I'm trying to use titan-cassandra 1.0.0 with guava-25.0-jre. Upon upgrade of guava from 18.0 to 25.0-jre, I see below run time exception: [artifact:mvn] java.lang.IllegalAccessError: tried to access method com.google.common.collect.Iterators.emptyIterator()Lcom/google/common/collect/UnmodifiableIter...
Cys
1

votes
0

answer
34

Views

Cassandra + Solr order are not right with few nodes

I'm using Datastax Enterprise with Cassandra + Solr, I've 2 nodes with replication factor of 2 - means all the data is on both servers. I've a problem that when I pull the data from the Solr the order is not right and then I get the same results twice because I'm using loadbalncer so on each request...
Rafael Mor
1

votes
0

answer
92

Views

akka-persistence-cassandra too many reads from metadata table

We have a multi node web application that uses akka-persistence-cassandra to store incoming events. Recently we were told that our application is doing nearly 2.8mln reads per day from cassandra messages and metadata table.(combined) I understand the need to read from messages table but i am still n...
ayush
1

votes
0

answer
95

Views

Akka persistence- How do storage plugins work?

I have been going through the Akka persistence documentation. In the storage plug-ins i.e. Journal and Snapshot sections, I see that these plug-ins can be customized in the following way... # Path to the journal plugin to be used akka.persistence.journal.plugin = 'my-journal' # My custom journal plu...
Amit Akarsh
1

votes
0

answer
186

Views

how to create keyspace for cassandra using docker compose v3

I am trying to create keyspace using docker-compose v3, but it is not working out, my docker-compose.yaml looks like following : version: '3' services: cassandra: image: cassandra:latest networks: - default ports: - '9042:9042' volumes: - ../compi${COMPI}/data/cassandra:/var/lib/cassandra - ../../sq...
Nidhi Sharma
1

votes
1

answer
23

Views

Cassandra - how to update a record with a compound key

In the process of learning Cassandra and using it on a small pilot project at work. I've got one table that is filtered by 3 fields: CREATE TABLE webhook ( event_id text, entity_type text, entity_operation text, callback_url text, create_timestamp timestamp, webhook_id text, last_mod_timestamp times...
Tsar Bomba
1

votes
0

answer
125

Views

How to run Apache Cassandra 3.x on Windows

I want to share my findings on how to run Apache Cassandra on Windows, because since 3.0 became available, the instructions are not easy to find for windows developers. So here are the steps: 1.- Install Java 8 and configure JAVA_HOME env variable properly 2.- download tar.gz file from http://cassan...
hgc2002
1

votes
0

answer
40

Views

Fetch Dataframe Pandas with Cassandra Json Rows

I get a JSON like this every 30s: { mac: 'IAHXUH7DMZJ4' name: 'B14' desc: 'B14' -loc: { lat: 49.819225 lng: 1.980784 levelId: 0 prec: 3.75 } lrrt: 0 -rss: { F45EAB0C14C7: -76 F45EAB0C0ED5: -76 F45EAB142A61: -90 F45EAB0C0EC7: -84 F45EAB08AAAD: -91 F45EAB0C1B67: -90 F45EAB0C1978: -79 } } -{ mac: 'IA9M...
Jonj

View additional questions