spot7.org logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
  Home » CASSANDRA » Page 1
Deleting in cassandra cql table using IN operator
That's because the IN operator only works on the last part of the primary key, or the last part of the clustering key. I thought before that "tuple notation" would work, but according to this doc, it only works on clustering columns. That being said, using IN combined with = should work on either key column: aploetz@cqlsh:stackoverflow> SELECT * FROM temp_date_time_wise WHERE date = '2014-1

Categories : Cassandra

cassandra backup like mysql
You have a few options...for small amounts of data, you can use COPY to backup / restore from csv: http://www.datastax.com/documentation/cql/3.0/cql/cql_reference/copy_r.html For larger stuff, you've got the right link. You essentially take a snapshot (which puts it in the folder you mention), and then use something like tar to zip the files and output to a different directory. This is what we'r

Categories : Cassandra

Effects of increasing the replication factor on the performance of cassandra
This should be completely expected. Consistency level one will keep the performance of your reads as basically the same (if not improved since their are more possible machines to serve each read) but your writes will be doing significantly more work. Every write to the cluster, regardless of consistency level, will end up causing a write to every replica node for that data. The consistency level

Categories : Cassandra

Cassandra (DSE): Services or No-Services, what to prefer?
The services/no-services makes absolutely no difference in terms of features or ease of operations after the installation is finished. The GUI services/no-services installer was introduced recently (DataStax 4.5) to simplify installation and configuration for folks who are not comfortable with command line tools. In earlier releases, before the GUI installer was introduced, you could install DSE o

Categories : Cassandra

com.datastax.driver.core.exceptions.InvalidQueryException: PRIMARY KEY part sequence found in SET part
Cassandra don't allow you to update primary key. You can not do something like below because SEQUENCE is part of primary key. UPDATE STYLINGBEE.LKPSTYLES SET SEQUENCE = 1 WHERE STYLEID = 1000;

Categories : Cassandra

How to get tombstone count for a cql query?
For tombstone counts on a query your best bet is to enable tracing. This will give you the in depth history of a query including how many tombstones had to be read to complete it. This won't give you the total tombstone count, but is most likely more relevant for performance tuning. In cqlsh you can enable this with cqlsh> tracing on; Now tracing requests. cqlsh> SELECT * FROM ascii_ks.a

Categories : Cassandra

DataStax Enterprise: saveToCassandra generate a lot of hinted handoff
The sleep in your statement is most likely not actually slowing down the execution of this query. Since the operations are applied on a per partition basis, my guess would be that the sleep simply pauses before an entire partition begin's being written. For the real issue. The only reason that you will be generating hints is if one of your nodes is unable to keep up with the amount of data being

Categories : Cassandra

Copying a value from table to another using cassandra
Please try this Insert into initialActivity() values (select activity from preActivity where caseId = 111 LIMIT 1 ); Only first rows with column activity with caseId = 111 will get inserted into initialActivity table Please refer this for more info CQL

Categories : Cassandra

Cassandra Data Model for sumed time series data
Maybe something similar to "Time Series Pattern 2 Partitioning to limit row size", but using a week of the year instead of day of the year for the date, would work for you. Maybe you could use some Cassandra features for granularity in slicing over partition rows described on this page: http://www.datastax.com/documentation/cql/3.1/cql/cql_using/use-slice-partition.html. For example: CREATE

Categories : Cassandra

Cassandra: what is the most scalable data model for managing tags?
Like most things in Cassandra, it really depends on your queries, and data size. Can one tag have values that go over one or a few hundred meg? In that case, you'll want to bucket within a tag. Are you trying to look up values for two tags together? In that case, you might create a tag out of multiple tags. This is assuming simple text tags. With huge data sets, simply having tags-> values may no

Categories : Cassandra

Spark Cassandra connector - Range query on partition key
i think the CassandraRDD error is telling that the query that you are trying to do is not allowed in Cassandra and you have to load all the table in a CassandraRDD and then make a spark filter operation over this CassandraRDD. So your code (in scala) should something like this: val cassRDD= sc.cassandraTable("keyspace name", "table name").filter(row=> row.getDate("timestamp")>=DateFormat('

Categories : Cassandra

Cassandra UPDATE primary key value
For a relatively simple way, you could always do a quick COPY TO/FROM in cqlsh. Let's say that I have a column family (table) called "emp" for employees. CREATE TABLE stackoverflow.emp ( id int PRIMARY KEY, fname text, lname text, role text ) And for the purposes of this example, I have one row in it. aploetz@cqlsh:stackoverflow> SELECT * FROM emp; id | fname | lname | ro

Categories : Cassandra

Cassandra Streaming error - Unknown keyspace system_traces
I got the same error while I was trying to setup my cluster, and as I was experimenting with different switches in cassandra.yaml, I restarted the service multiple times and removed the system dir under data directory (/var/lib/cassandra/data as mentioned here). I guess for some reason cassandra tries to load system_traces keyspace and fails (the other dir under /var/lib/cassandra/data), and nod

Categories : Cassandra

How to know the size of a keyspace and column family in Cassandra?
To get statistics regarding column families in Cassandra, you can simply run the command: nodetool cfstats It reports statistics about tables which include the live data size as well as on disk. The documentation about this utility for Cassandra 2.0 is available here.

Categories : Cassandra

Cassandra cqlsh Unable to connect to any servers - 127.0.0.1:9160 (closed)> is already closed
I think the issue was the result of having a previous installation that wasn't properly uninstalled. My user .cassandra directory had some default configs, that must have been for a different version, and prevented cqlsh from starting. rm -Rf ~/.cassandra After that, I could run cqlsh properly. $ bin/cqlsh Connected to Test Cluster at 127.0.0.1:9042. [cqlsh 5.0.1 | Cassandra 2.1.2 | CQL spec

Categories : Cassandra

Create a super column using CQL3
CREATE TABLE user ( rowkey varchar, division text, head_name text, address text, PRIMARY KEY (rowkey, division) ) OR CREATE TABLE user ( rowkey varchar, division text, head_name text, head_address text, PRIMARY KEY ((rowkey, division)) ) Under the covers the first example will have each rowkey assigned to the same partition. Each rowkey will have a set of logical rows, one

Categories : Cassandra


Recently Add
How to Configure multiple node cluster with Cassandra on Windows 7 64 bit?
Deleting in cassandra cql table using IN operator
cassandra backup like mysql
Effects of increasing the replication factor on the performance of cassandra
Cassandra (DSE): Services or No-Services, what to prefer?
com.datastax.driver.core.exceptions.InvalidQueryException: PRIMARY KEY part sequence found in SET part
How to get tombstone count for a cql query?
DataStax Enterprise: saveToCassandra generate a lot of hinted handoff
Copying a value from table to another using cassandra
Cassandra Data Model for sumed time series data
Cassandra: what is the most scalable data model for managing tags?
Spark Cassandra connector - Range query on partition key
Cassandra UPDATE primary key value
Cassandra Streaming error - Unknown keyspace system_traces
How to know the size of a keyspace and column family in Cassandra?
Cassandra cqlsh Unable to connect to any servers - 127.0.0.1:9160 (closed)> is already closed
Create a super column using CQL3
© Copyright 2017 spot7.org Publishing Limited. All rights reserved.