cassandra-2.0

Cassandra - Is there a way to limit number of async queries?

核能气质少年 提交于 2019-12-17 07:38:37
问题 I would like to know if there is way to limit the number of queries executed simultaneously by the cassandra java driver ? Currently, I execute a lot of queries as follows : ... PreparedStatement stmt = session.prepare("SELECT * FROM users WHERE id = ?"); BoundStatement boundStatement = new BoundStatement(stmt); List<ResultSetFuture> futures = Lists.newArrayListWithExpectedSize(list.length); for(String id : list ) { futures.add(session.executeAsync(boundStatement.bind(id))); } for

copy one table to another in cassandra

不问归期 提交于 2019-12-14 00:14:46
问题 i want to copy data from standardevents to standardeventstemp.. below steps i am doing COPY events.standardevents (uuid, data, name, time, tracker, type, userid) TO 'temp.csv'; truncate standardevents; COPY event.standardeventstemp (uuid, data, name, time, tracker, type, userid) FROM 'temp.csv'; but i am getting below error after 3rd step Bad Request: Invalid STRING constant (3a1ccec0-ef77-11e3-9e56-22000ae3163a) for name of type uuid aborting import at column #0, previously inserted values

what leads to wide row in cassandra?

本秂侑毒 提交于 2019-12-13 21:00:38
问题 I found the following from this post: create table posts(username varchar, time timeuuid, post_text varchar, primary key(username, time)) There will only be as many CF rows as there are variations of the first element in your primary key. This can be a problem if this element has a very low cardinality as you can end up with very wide CF rows. My point is: what I have bolded above, shouldn't this be second element in primary key. That is, the secondary element or clustering element causes

Cassandra - alternate way for clustering key with ORDER BY and UPDATE

一曲冷凌霜 提交于 2019-12-13 13:42:38
问题 My schema is : CREATE TABLE friends ( userId timeuuid, friendId timeuuid, status varchar, ts timeuuid, PRIMARY KEY (userId,friendId) ); CREATE TABLE friends_by_status ( userId timeuuid, friendId timeuuid, status varchar, ts timeuuid, PRIMARY KEY ((userId,status), ts) )with clustering order by (ts desc); Here, whenever a friend-request is made, I'll insert record in both tables. When I want to check one to one status of users, i'll use this query: SELECT status FROM friends WHERE userId=xxx

Cassandra Cluster Set up - Unable to gossip with any seeds

隐身守侯 提交于 2019-12-13 07:24:56
问题 I am trying to set up a 3 node Cassandra VM cluster. I installed cassandra from datastax package on individual vms and then modified the following: Seed - vm1 (set the ip address in all the vm configs) Updated the config with listen_address as the host ip, added the rpc_broadcast_address Added the cassandra ports in the firewall rules to allow for inter vm communication Also tried connecting to the vms using SSH After trying all of this, I started the cassandra seed node, it comes up fine and

Am I using cassandra efficiently?

China☆狼群 提交于 2019-12-13 05:51:31
问题 I have these table CREATE TABLE user_info ( userId uuid PRIMARY KEY, userName varchar, fullName varchar, sex varchar, bizzCateg varchar, userType varchar, about text, joined bigint, contact text, job set<text>, blocked boolean, emails set<text>, websites set<text>, professionTag set<text>, location frozen<location> ); create table publishMsg ( rowKey uuid, msgId timeuuid, postedById uuid, title text, time bigint, details text, tags set<text>, location frozen<location>, blocked boolean,

Cassandra and defuncting connection

↘锁芯ラ 提交于 2019-12-13 05:15:22
问题 I've got a question about Cassandra. I haven't found any "understable answer" yet... I made a cluster build on 3 nodes (RackInferringSnitch) on differents VM. I'm using Datastax's Java Driver to read and update my keyspace (with CSVs). When one node is down (ie : 10.10.6.172), I've got this debug warning: INFO 00:47:37,195 New Cassandra host /10.10.6.172:9042 added INFO 00:47:37,246 New Cassandra host /10.10.6.122:9042 added DEBUG 00:47:37,264 [Control connection] Refreshing schema DEBUG 00

Installing thrift on CentOS 6.5 64 bit and Cassandra PDO

点点圈 提交于 2019-12-13 01:49:15
问题 Possibly my first question in this space. I have been trying to get around this issue from last 2 days. Yeah that seems to be a lot. Here is whats going on To install thrift I am following somewhat whats on Apache Thirfts website (thrift.apache.org/docs/install/centos/) yum install boost-devel php-devel pcre-devel automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel libtool* Then I would execute the following commands cd /opt/ wget https:

Astyanax Cassandra Double type precision

自作多情 提交于 2019-12-12 10:47:43
问题 I'm trying to get a Double value from a Cassandra table with a double type column. I've created the table in CQL3 syntax: CREATE TABLE data_double ( datetime timestamp, value double, primary key (datetime) ); I've inserted a row: INSERT INTO data_double (datetime, value) VALUES ('111111111', 123.456); When I do: SELECT * from data_double; I get that the value is 123.46 Why is the value rounded? Thanks 回答1: The cqlsh utility by default will only display 5 digits of precision for floating point

Create keyspace automatically inside docker container with cassandra

北战南征 提交于 2019-12-12 09:32:27
问题 I was wondering if someone has tried to build a cassandra docker image with default keyspace, I've tried to do it on BUILD time but it doesn't work because cassandra is not running in that phase. It was something similar to this: FROM cassandra:2.0 COPY ../somewhere/keyspace_definition.txt /src/keyspace_definition.txt RUN /usr/bin/cqlsh -f /src/keyspace_definition.txt My new approach will be to do it from the entrypoint script, but, I wanted to now if someone else has a better idea. Happy