2018-10-21         Rosalind

Bulk loading in Cassandra, issue of dirty reads, and its effect in cluster

Our use case is load bulk data into our live production Cassandra cluster. We have to load bulk data in Cassandra on daily basis. We came across sstableloader. We have few queries around same:1: When we are loading bulk data into our live production cluster using sstableloader, do we have a chance of dirty read?(Basically does sstableloader load all data at once or it continues to update as and when it is getting data?) Dirty read is not acceptable in our production environment. 2: When we are loading bulk data into our live production cluster, does it affect cluster availa...

 cassandra                     1 answers                     46 view
 2018-10-21         Ed

Cassandra backup and restore consistency

The scenario is as follows:I have 1 Cassandra node in which I have one keyspace, in which I have 2 tables. Let's call these tables A and B. Now I have a script that inserts data very quickly into these two tables in a batch statement. Table A has columns "k" and "value". Table B has columns "k" and "value". The batch query is as follows:BEGIN BATCHINSERT INTO A(k, value) VALUES ("a", 1);INSERT INTO B(k, value) VALUES ("b", 1);APPLY BATCHThe value 1 keeps getting incremented every successive batch query. So if table A has (a, 1000), then table B must have (b, 1000). Because ...

 cassandra                     1 answers                     4 view
 2018-10-21         Aurora

Cassandra - auto generate client query libraries in multiple languages given a cqlsh plain text query string

I'd like to be able to auto generate client code in several languages given a cqlsh "INSERT" statement So for instance if I have a "INSERT" statement like:INSERT INTO MY_TABLE(C1,C2) VALUES (?,?);I would be able to generate typesafe clients in several languages to "SELECT" against this exact queryIs this possible? Real type safety will be possible only if you combine it with the table definition, etc. But there are no such tools exists right now...For almost all languages the code structure be quite similar (pseudo-code):// somewhere at beginning, only onceprepStatement ...

 cassandra                     1 answers                     11 view
 2018-10-21         Dawn

Cassandra CLI command with cqlsh -e how to declare

In my Cassandra table, it had been created with all columns in Upper case. When we tried to select the columns in cqlsh terminal, we were able to select those columns . but when we tried to pull same query based on the cqlsh -e facing some issue with escaping character. Please suggest on this. cqlsh:key1> select "PLAN_ID" ,"A_ADVERTISER_ID" ,"ADVERTISER_NAME" from key1.plan_advertiser where "PLAN_ID" = '382633' and "A_ADVERTISER_ID" = 15019; PLAN_ID | A_ADVERTISER_ID | ADVERTISER_NAME---------+-----------------+---------------------- 382633 | 15019 | Hanesbra...

 cassandra                     1 answers                     97 view
 2018-10-21         Walter

Is there a way to effectively count rows of a very huge partition in Cassandra?

I have very huge Cassandra table containing over 1 billion records. My primary key forms like this: "(partition_id, cluster_id1, cluster_id2)". Now for several particular partition_id, I have too many records that I can't run row count on these partition keys without timeout exception raised.What I ran in cqlsh is:SELECT count(*) FROM relation WHERE partition_id='some_huge_partition';I got this exception: ReadTimeout: Error from server: code=1200 [Coordinator node timed out waiting for replica nodes' responses] message="Operation timed out - received only 0 responses." in...

 cassandra                     1 answers                     99 view
 2018-10-21         Leo

Cannot start Cassandra : Port already in use

I have two Ubuntu 16.04 nodes on which I installed Cassandra 3.11.3 with java version "1.8.0_181". I want to merge these two nodes into a Cassandra cluster. Their intern ips are and each /etc/cassandra/cassandra.yaml file I modified the following lines:cluster_name: 'my_cluster'- seeds: ","listen_address: XXXXrpc_address: XXXXwhere XXXX is respectively the intern ip of the current node.I then restart Cassandra on each nodesudo service cassandra restartand check that Cassandra runs :sudo service cassandra status cassandra....

 cassandra                     1 answers                     100 view
 2018-10-21         Antonia

Cassandra Copy Issue

I have this csv file which I am trying to copy into my cassandra table. This is the schema:CREATE TABLE keyspace.mytable ( A int, B text, C text, uuid text, D text, E boolean, F text, G text, PRIMARY KEY (A, B, C, uuid)) WITH CLUSTERING ORDER BY (B ASC, C ASC, uuid ASC) AND bloom_filter_fp_chance = 0.01 AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}' AND comment = '' AND compaction = {'unchecked_tombstone_compaction': 'true', 'tombstone_compaction_interval': '1200', 'class': 'org.apache.cassandra.db.compaction.LeveledCompac...

 cassandra                     1 answers                     102 view
 2018-10-21         Marvin

How do we do spatial queries in Cassandra? Is there any GIS extension for Cassandra?

I need a GIS extension in cassandra extension to capture, store, manipulate, analyze, manage, and present all types of geographical data. Something like PostGIS for PostgreSQL. Any suggestions? GeoMesa project has support for Cassandra as a storage, but it's performance may not be very optimal because of data model & queries. [XXX]

 cassandra                     1 answers                     36 view
 2018-10-21         Armstrong

how to connect to a password protected cassandra using pig

I have a cassandra cluster with username and password set in the password.properties file, I could'n figure out how to use pig's CassandraStorage to load and write data to this cluster. Without the password, the function is fine.Any help? In CassandraStorage#initSchema you would want to add a call to build an AuthenticationRequest struct and add a call to client#login just before client#set_keyspace.Created: https://issues.apache.org/jira/browse/CASSANDRA-3042 [XXX]

 cassandra                     1 answers                     90 view
 2018-10-21         Heloise

Getting error "Unable to find replication strategy class 'org.apache.cassandra.locator.simplestrategy" while creating keyspace

I have installed "DataStax Distribution of Apache Cassandra 3.9.0".After opening cassandra CQL shell i ran the below commandCreate keyspace KeyspaceNamewith replicaton{'class':'simplestrategy','replication_factor': 1}But i am getting an error:Unable to find replication strategy class 'org.apache.cassandra.locator.simplestrategy' The replication strategy class name is case sensitive in CQL, the correct syntax for a SimpleStrategy with replication factor of 1 is:CREATE KEYSPACE my_keyspaceWITH replication = {'class': 'SimpleStrategy', 'replication_factor' : 1} [XXX]

 cassandra                     1 answers                     35 view
 2018-10-21         Zachary

Gather nodetool status output via JMX Mbeans

Is there a way to get the information provided by nodetool status using JMX Mbean? I would like query the information using the JMX org.apache.cassandra.db:type=StorageService is the JMX which gives the details. [XXX]

 cassandra                     1 answers                     36 view
 2018-10-22         Kimberley

DSE 5.1.10 table with no columns.. Restart Error

Facing Error while cassandra restart. ERROR [main] 2018-09-04 03:04:53,490 CassandraDaemon.java:723 - Exception encountered during startup org.apache.cassandra.schema.SchemaKeyspace$MissingColumns: Columns not found in schema table for test.test1 at org.apache.cassandra.schema.SchemaKeyspace.fetchColumns(SchemaKeyspace.java:1120) at org.apache.cassandra.schema.SchemaKeyspace.fetchTable(SchemaKeyspace.java:1066) at org.apache.cassandra.schema.SchemaKeyspace.fetchTables(SchemaKeyspace.java:1009) at org.apache.cassandra.schema.SchemaKeyspac...

 cassandra                     1 answers                     47 view
 2018-10-22         Otis

how to use json data inside list in cassandra?

i want to upload data in form of json inside list example:create table product (product_details list<text>, location varchar, primarykey(location));Insert into product(product_details,location) values( [ {"productname": "xyz"}, {"price":"100"} ], 'bangalore' );It is showing errors First of all you have syntax error in create table query for primary key. And next problem you can try insert value ...

 cassandra                     1 answers                     48 view
 2018-10-22         Yvette

Create user type with list<text> in cassandra

I have a table to create in cassandra with custom type.From java project, I have this class :public class Product { @Column(value = "tags") private List<String> tags; @Column(value = "price") private double price;}I want to create a user-type in cassandra with this class :CREATE TYPE quangkeyspace.student ( tags list<text>, price floats);But it has error when execute : InvalidRequest: Error from server: code=2200 [Invalid query] message="A user type cannot contain non-frozen UDTs"How to solve this problem? Depending on your Cassandra version, yo...

 cassandra                     1 answers                     46 view
 2018-10-22         Herman

Cassandra corruption due to UDT column drop

Our production Cluster Cassandra version is: [cqlsh 5.0.1 | Cassandra 3.11.3 | CQL spec 3.4.4 | Native protocol v4]After a restart to the Cassandra nodes the Cassandra did not started and the following error was printed:INFO [main] 2018-08-22 15:30:04,082 CommitLogReader.java:105 - Skipping playback of empty log: CommitLog-6-1534951460541.logDEBUG [main] 2018-08-22 15:30:04,082 CommitLogReader.java:273 - Reading /var/lib/cassandra/commitlog/CommitLog-6-1527416281330.log (CL version 6, messaging version 11, compression null)INFO [Service Thread] 2018-08-22 15:30:06,501 GCI...

 cassandra                     1 answers                     49 view
 2018-10-22         John

how to use in and order by at the same time in cassandra

I see the official document: https://docs.datastax.com/en/cql/3.1/cql/cql_using/useColumnsSort.htmlcan use "SELECT * FROM users WHERE userID IN (102,104) ORDER BY age ASC;"how to define the users table or materialized view?PAGING OFF is a must?Here is my current view:CREATE MATERIALIZED VIEW navigation_by_id_time AS SELECT * FROM navigation WHERE competition_id IS NOT NULL AND event_type_id IS NOT NULL AND event_id IS NOT NULL AND market_id IS NOT NULL AND market_start_time IS NOT NULL AND market_suspend_time IS NOT NULL PRIMARY KEY (event_type_id, market_...

 cassandra                     1 answers                     49 view

Page 1 of 61  |  Show More Pages:  Top Prev Next Last