cassandra-2.0

Does DateTieredCompactionStrategy work with composite keys?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 07:18:58
问题 Does DateTieredCompactionStrategy in Apache Cassandra 2.1.2. work with a compound clustering key? More specifically, like with this table where (timestamp, hash) makes up a compound clustering key: CREATE TABLE sensordata ( timeblock int, timestamp timestamp, hash int, data blob, PRIMARY KEY (timeblock, timestamp, hash) ) I believe, that the DateTieredCompactionStrategy would work for PRIMARY KEY (timeblock, timestamp) -- but does it also work for PRIMARY KEY (timeblock, timestamp, hash) ?

Cassandra “Detected unreadable sstables ” Error

◇◆丶佛笑我妖孽 提交于 2019-12-11 06:03:47
问题 On my windows box, after a graceful restart for windows update, I get the following error in Cassandra (2.2.0) and it will not start: ERROR 10:36:41 Detected unreadable sstables D:\cassandra_data\data\gputptest-abcdedf-5040777060fe11e5a8557fcd8340170b-KeyCache-b.db,D:\cassandra_data\data\OpsCenter-events_timeline-afbbeee05cea11e59ba77fcd8340170b-KeyCache-b.db,D:\cassandra_data\data\system-IndexInfo-9f5c6374d48532299a0a5094af9ad1e3-KeyCache-b.db,...., please check NEWS.txt and ensure that you

Spark Sql query fails

半世苍凉 提交于 2019-12-11 05:45:02
问题 Using Sparks 2/java/Cassanda2.2 Trying to run a simple sparks sql query, it errors: Tried as below, + variations like "'LAX'", and '=' instead of '=='. Exception in thread "main" org.apache.spark.sql.AnalysisException: cannot resolve '`LAX`' given input columns: [transdate, origin]; line 1 pos 42; 'Project ['origin] +- 'Filter (origin#1 = 'LAX) +- SubqueryAlias origins +- LogicalRDD [transdate#0, origin#1] JavaRDD<TransByDate> originDateRDD = javaFunctions(sc).cassandraTable("trans", "trans

Regarding upgrade from 2.0.3 to 2.0.7

落花浮王杯 提交于 2019-12-11 05:18:17
问题 I am currently planning for an upgrade to 2.0.7 cassandra version . My base version is 2.0.3. I have not done an upgrade so far and hence want to be absolutely sure about what am doing . Can someone explain what needs to be done apart front this. Do a nodetool drain to stop all writes to the particular node. Stop the cassandra node(I have a 8 node , 2 data center network topology. I am bringing down one node in DC1) Change the cassandra.yaml accordingly in the new binary tarball. Make the

gocql SELECT * doesn't return all columns

╄→гoц情女王★ 提交于 2019-12-11 03:57:53
问题 I came across this weird behaviour while trying to implement some counters for my application. Basically, I did a counter table like so : CREATE TABLE stats_dev.log_counters ( date text PRIMARY KEY, all counter ); Then I have some specific types of message I want to count as well, so in my Go app, I ALTER the table to add the column I didn't have before. My app is growing, and I start to have more than 30 columns (shouldn't be more than 50) and when I want to retrieve all those counters, some

Can an index be created on a UUID Column?

…衆ロ難τιáo~ 提交于 2019-12-11 03:25:46
问题 Is it possible to create an index on a UUID/TIMEUUID column in Cassandra? I'm testing out a model design which would have an index on a UUID column, but queries on that column always return 0 rows found. I have a table like this: create table some_data (site_id int, user_id int, run_id uuid, value int, primary key((site_id, user_id), run_id)); I create an index with this command: create index idx on some_data (run_id) ; No errors are thrown by CQL when I create this index. I have a small bit

Cassandra 2.1: Recursion by nesting UDT's

假装没事ソ 提交于 2019-12-11 01:58:47
问题 I was playing around with the user-defined types and found out you can do something like this: cqlsh:test> CREATE TYPE ping(time timestamp); cqlsh:test> CREATE TYPE pong(time timestamp, ping frozen <ping>); cqlsh:test> ALTER TYPE ping ADD pong frozen <pong>; cqlsh:test> DESC TYPE ping ; CREATE TYPE test.ping ( time timestamp, pong frozen<pong> ); cqlsh:test> DESC TYPE pong ; CREATE TYPE test.pong ( time timestamp, ping frozen<ping> ); Is this relevant for any use case? 回答1: Just came across

How to make values unique in cassandra

[亡魂溺海] 提交于 2019-12-11 01:55:40
问题 I want to make unique constraint in cassandra . As i want to all the value in my column be unique in my column family ex: name-rahul phone-123 address-abc now i want that i this row no values equal to rahul ,123 and abc get inserted again on seraching on datastax i found that i can achieve it by doing query on partition key as IF NOT EXIST ,but not getting the solution for getting all the 3 values uniques means if name- jacob phone-123 address-qwe this should also be not inserted into my

Cassandra cqlsh query fails with no error

核能气质少年 提交于 2019-12-11 01:46:46
问题 I have been trying to run a query like this: SELECT COUNT(*) FROM sensors WHERE sensor_id = 1 and date = '2014-11'; on a column family. The WHERE clause filters down to a partition key with around 2 million columns. I expect to get a count result of approx. 2 million, but instead I get this error: errors={}, last_host=[THE_IP_OF_MY_SERVER] if I run the query to get the columns it returns the data just fine, but it cannot return the count. I understand the performance issues such count query

Starting cassandra server with custom configuration file

旧街凉风 提交于 2019-12-10 23:42:32
问题 I was wondering whether its possible to pipe the configuration file for casssandra directly from the command instead of picking up the default file. 回答1: Yes, you can invoke Cassandra with the -d flag. That flag will allow you to specify cassandra.config=directory , if you need to specify one on-the-fly. Cassandra will then look for the cassandra.yaml file in that directory, instead of the default. For other options on the cassandra utility, check the DataStax docs. 来源: https://stackoverflow