Questions tagged [cassandra]

1

votes
1

answer
363

Views

Cassandra 2.x: secondary index on a unique value

Let's say I have a user with an id and email fields, both are unique, and I want to query by both of them. id will be part of the primary key, but the question is what to do with email. The first option is to create a "manual index", something like an email_to_user table. There the email would be th...
adamw
1

votes
1

answer
557

Views

Cassandra order by on combination of composite keys

I originally wrote a table that tracks feeds that have been assigned to a user for review. create table user_feed { userid uuid, languageid uuid, topicid_uuid, dateinserted timeuuid, primary key (userid, languageid, topicid, dateinserted) }; I realized soon after I created this table that I wouldn'...
kha
1

votes
1

answer
9.2k

Views
1

votes
3

answer
322

Views

Does Cassandra support aggregation function or any other capabilities like Map Reduce?

I am new to Cassandra I am actually doing some investigation and proof of concept to see if it is suitable for our current task. As I am reading about Cassandra and according to what I understand it does not support Aggregations or Map Reduce framework to accomplish aggregation tasks. I have check...
Adelin
1

votes
1

answer
486

Views

Cassandra Performance : Less rows with more columns vs more rows with less columns

We are evaluating if we can migrate from SQL SERVER to cassandra for OLAP. As per the internal storage structure we can have wide rows. We almost need to access data by the date. We often need to access data within date range as we have financial data. If we use date as Partition key to support filt...
107
1

votes
1

answer
464

Views

Restricting Cassandra to localhost only

I installed cassandra as a service on Ubuntu. Test Cluster is accessible on 127.0.0.1:9042. I want to restrict everything related to cassandra to localhost only, nothing open to internet. Currently, this is what I see on netstat -tulpen: udp 0 0 130.159.223.50:123 0.0.0.0:* udp...
Usman Ijaz
1

votes
1

answer
1.7k

Views

What does Cassandra nodetool repair exactly do?

From http://docs.datastax.com/en/cassandra/2.0/cassandra/operations/ops_repair_nodes_c.html I know that The nodetool repair command repairs inconsistencies across all of the replicas for a given range of data. but how does it fix the inconsistencies? It's written it uses Merkle trees - but that's fo...
piotrwest
1

votes
1

answer
85

Views

Is it acceptable to have 100% ownership on every Cassandra node?

I am working on a Cassandra cluster with 3 nodes and this is the current ownership rate: 19:36:30 [email protected]:~# nodetool status foo Datacenter: Foo ===================== Status=Up/Down |/ State=Normal/Leaving/Joining/Moving -- Address Load Tokens Owns (effective) Host ID...
Istvan
1

votes
1

answer
266

Views

Run Query against multiple namespaces with Spring Data Cassandra

Is there any way in which using Spring Data a query can be executed on all keyspaces in Cassandra?
Carolik
1

votes
1

answer
1.8k

Views

Cassandra not removing deleted rows despite running nodetool compact

Very often I have ghost rows that stay on the server and won't disappear after deleting a row in Cassandra. I have tried all possible administration options with nodetool (compact, flush, etc.) and also connected to the cluster with jconsole and forced a GC thru it but the rows remain on the cluster...
favo
1

votes
1

answer
893

Views

Exception in thread “streaming-start” java.lang.NoSuchMethodError: org.apache.kafka.clients.consumer.KafkaConsumer.subscribe(Ljava/util/Collection;)V

When I submit the spark application, getting the below error: Exception in thread "streaming-start" java.lang.NoSuchMethodError: org.apache.kafka.clients.consumer.KafkaConsumer.subscribe(Ljava/util/Collection;)V Went through the below URL: http://apache-spark-developers-list.1001551.n3.nabble.com/t...
bigspark
1

votes
1

answer
233

Views

Cassandra performance using IN clause on clustering keys

Let's consider the following table CREATE TABLE base_table( partition_key uuid, clustering_key1 uuid, clustering_key2 uuid, regular text, PRIMARY KEY((partition_key), clustering_key1, clustering_key2) ); Prior to Cassandra 2.2, it was not possible to do queries like this : SELECT * FROM base_table...
Elendil
1

votes
1

answer
34

Views

Cassandra: Is Linux and Windows compatible?

At the moment, I am using a Cassandra database on a Windows 7 system. We'd like to use Cassandra on Linux now and wonder if it's possible to migrate the data with a simple copy of the data directory from Windows to Linux? Can someone tell me if that's possible, meaning if the Windows data structure...
Aliquis
1

votes
2

answer
20

Views

Unable to find ScyllaDb tarball and rpm downloadable link

I require to upgrade scyllaDB on RHEL based system. tried to find rpm or terball of scyllaDB but unable to find and download. many times I visited scyllaDB official site where I found the link for binary/RPM but not successful to download. Please provide downloadable link of all scylladb version RPM...
Pandey
0

votes
0

answer
3

Views

Multiple Compaction Activities creating load on Cassandra Nodes

Some of Nodes in our PROD cluster goes Yellow, RED or even Grey because of high load. But nodes are still working. Timeout during this time comes in Bulk. All of this happen during Compaction activities running on this node. Is there a way to control Auto Compaction activities for a keyspace or con...
Anil Kapoor
0

votes
0

answer
3

Views

Adding a Ansible variable to Cassandra config template Yaml

I'm using Ansible to setup an AWS Cassandra cluster and I'm trying to pass the dynamic IPs to a YML template file. I have the IPs assigned to an Ansible group variable and want to use this when populating my Cassandra config YML. In Play 1 I initially assign the group like: file : roles/gather_cas...
MeanwhileInHell
1

votes
2

answer
590

Views

cassandra node driver doesnot accept dash separated string

I am using this driver as a bridge between cassandra and my node js app. Everything seems to work fine till now except following issue: Issue I have a column of type varchar, when i am inserting a string which has dash (-) in it then cassandra throws errorString didn't validate.. I am using batch s...
guptakvgaurav
1

votes
1

answer
434

Views

cassandra python driver bind to int

I am using the datastax driver for python. It seems the preparedstatement can not bind to an int input? item_by_user1 = session.execute(item_by_user_lookup_stmt.bind(int(123))) it dumps the error message TypeError: object of type 'int' has no len() Is python driver restricted to work with text field...
bhomass
-1

votes
0

answer
6

Views

Is there a way of paging in spring data cassandra?

I know Cassandra supports forward pagination but I've been looking for pagination in spring data cassandra and I couldn't find a solution. Is there a way to do that?
Mehmet Ali Gezkaya
1

votes
1

answer
1.1k

Views

How to create dynamic schema using CQL

I need to insert a new column to a row to handle semi structured data using CQL. Is it possible ? If it is possible, please advise.
sras
1

votes
1

answer
896

Views

Why does using custom case class in Spark shell lead to serialization error?

For the life of me I can't understand why this is not serializable. I'm running below in spark-shell (paste mode). I'm running on Spark 1.3.1, Cassandra 2.1.6, Scala 2.10 import org.apache.spark._ import com.datastax.spark.connector._ val driverPort = 7077 val driverHost = "localhost" val conf = new...
drecute
1

votes
2

answer
652

Views

Vertex Label with given name does not exist

I am trying to execute the following code: public class Friendster { /** * @param args * @throws FileNotFoundException */ public static void load(final TitanGraph graph,String filePath) throws FileNotFoundException { Scanner sc = new Scanner(new File(filePath)); System.out.println("Inside Load Func...
Amnesiac
1

votes
2

answer
264

Views

Loading Cassandra data into Titan/ Neo4J

I have wikipedia data in a Cassandra table (one row = one wiki article). Now I want to insert this into a graph database so I could see the relations between them. What I tried so far is to get records from Cassandra one by one and add them as nodes in Neo4J but this is very slow. Is there a way usi...
huhahihi
1

votes
1

answer
2k

Views

Using entity framework with cassandra database

I am working on a new project which is to use Asp.net MVC 5 and Cassandra. I am very OK working with entity framework. Is there a way of connecting entity framework to a Cassandra database? If not, can anyone help me with the necessary structures to have my MVC 5 application work with a Cassandra...
Willie
1

votes
2

answer
476

Views

Is there a way to use cassandra nodetool programatically?

For example, how I can take snapshots programmatically and also restore them. Please help me if you have any solution or workaround it.
Mayank Raghav
1

votes
1

answer
1.4k

Views

Cassandra and Apache Ignite Integration for Write-through and Read-through?

I want to integrate apache ignite in-memory feature in apache cassandra. How I can do that ? Is ay plugin avaliable for write-through and Read-throught ? What can be the possible architecture for efficient insertion and retrieval ?
user3632180
1

votes
2

answer
491

Views

dcos cassandra subcommand error

Can't seem to install the Cassandra package, marathon get's stuck in deployment in phase 1/2 and dcos cassandra subcommand issues the following stacktrace, any help appreciated. Traceback (most recent call last): File "/home/azureuser/.dcos/subcommands/cassandra/env/bin/dcos-cassandra", line 5, in...
Hugo Matinho
1

votes
1

answer
279

Views

What's the best-practises liveness check for Cassandra?

I have an HTTP healthcheck endpoint that checks that infrastructure dependencies such as Cassandra is up and running. For SQL databases liveness is commonly checked by executing SELECT 1. Is there an equivalent query that can be executed against Cassandra?
Ztyx
1

votes
1

answer
705

Views

Docker Check if DB is Running

entrypoint.sh contains various cqlsh commands that require Cassandra. Without something like script.sh, cqlsh commands fail because Cassandra doesn't have enough time to start. When I execute the following locally, everything appears to work properly. However, when I run via Docker, script.sh never...
datasci
1

votes
1

answer
465

Views

Cassandra greater than '>' issue

in Cassandra i am trying to retrieve text data from table using >= operation but , nothing retrieved although trying to use = it returns successfully this is sample of query select * from s.vechile_information where datetimelong >= '1493215758000' and vechile_customerid = '123' and vechileId = '...
Yousef Al Kahky
1

votes
1

answer
944

Views

How spring-data-cassandra handle connection pooling?

Can you please tell me how spring-data-cassandra handle connection pooling? I am usring spring-data-cassandra 1.5.3
FeeLGooD
0

votes
0

answer
5

Views

Spark integration with spring boot web starter

I am trying to integrate Spark application with spring boot but since spark core also has jetty server and servlet packages, they are conflicting with spring boot web starter servlet packages. I already followed the post below to exclude starter-logging https://www.linkedin.com/pulse/integrating-spa...
samuel puppala
1

votes
2

answer
526

Views

Using multiple hosts in cqlsh command

We are using a pig script to export data into Cassandra from hive. The script will truncate the cassandra table and run export . To perform TRUNCATE part, we are using the below command. But if that node is down at the moment , the script fails . $ cqlsh -u user -p password host1 -e "USE randomke...
Tony
1

votes
1

answer
57

Views

How does Cassandra balance the load when add a server/node

trying to find articles regarding how Casandra balances the load when add a server/node? that is, after adding a node, how cassandra moves certain partitions from existing nodes to new node, and how quick it could be done?
Southsouth
1

votes
1

answer
219

Views

Spring Data Cassandra - using CqlOperations to run arbitrary CQL

Not sure whether anything changed with the 2.0 release, but this code will no longer work in a Spring Boot test, when using Spring Data Cassandra 2.0.5: @Autowired CqlTemplate cqlTemplate; This was presented in a tutorial, and it's not really straightforward how to get a CqlOperations (the interface...
Marco
1

votes
2

answer
241

Views

Cassandra-unit : java.io.IOException: Connection reset by peer

I'm trying out Embedded Cassandra using cassandra-unit and ran into the following exception, com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /127.0.0.1 (com.datastax.driver.core.ConnectionException: [/127.0.0.1] Unexpected error during transpo...
1

votes
1

answer
85

Views

Trigger on TTL deletion Cassandra

I'm currently building an application in Java that uses a Cassandra database, and I would like to have a table that takes in data as it expires in another Cassandra table. Is there a way to implement a Trigger that can do this?
tbang3
1

votes
1

answer
40

Views

What happens if one DC in Cassandra runs out of physical memory?

I'm new to cassandra and I'm asking myself what will happen if I have multiple datacenters and at one point one datacenter won't have enough physical memory to store all the data. Assume we have 2 DCs. The first DC can store 1 TB and the second DC can only hold 500 GB. Furthermore lets say we have...
jSh4rk
1

votes
1

answer
30

Views

Cassandra - do not upsert

We have a requirement where we would like our application (which might be deployed on multiple hosts) to create a row in Cassandra. The only host which is successful in creating the row, execute the work. Would it be enough to write an insert statement like below so that if two server try to insert...
Shilpa
1

votes
1

answer
39

Views

Java - Cassandra with plenty of parameters in “IN”

I'm writing a Java application with Cassandra DB. I'm making a request with plenty (more than 100,000) parameters in my 'IN' clause : SELECT country, gender FROM persons WHERE person_id IN (1,7,18, 34,...,) But putting some many parameters in "IN" looks bad I think. I can also make plenty of request...
AntonBoarf

View additional questions