Re: CQL Composite Key Seen After Table Creation

2016-01-15 Thread Chris Burroughs
On 01/06/2016 04:47 PM, Robert Coli wrote: On Wed, Jan 6, 2016 at 12:54 PM, Chris Burroughs wrote: The problem with that approach is that manually editing the local schema tables in live cluster is wildly dangerous. I *think* this would work: * Make triple sure

Re: CQL Composite Key Seen After Table Creation

2016-01-06 Thread Robert Coli
On Wed, Jan 6, 2016 at 12:54 PM, Chris Burroughs wrote: > I work with Amir and further experimentation I can shed a little more > light on what exactly is going on under the hood. For background our goal > is to take data that is currently being read and written to

Re: CQL Composite Key Seen After Table Creation

2016-01-06 Thread Chris Burroughs
I work with Amir and further experimentation I can shed a little more light on what exactly is going on under the hood. For background our goal is to take data that is currently being read and written to via thrift, switch reads to CQL, and then switch writes to CQL. This is in alternative to

Re: CQL Composite Key Seen After Table Creation

2015-12-28 Thread Robert Coli
On Tue, Dec 22, 2015 at 6:55 AM, Amir Hassani wrote: > Defining the “column_metadata” after table creation vs during table > creation seems to affect the cql schema. We are running a large > high-throughput Cassandra 2.1.10 cluster. During table creation, the client >

CQL Composite Key Seen After Table Creation

2015-12-22 Thread Amir Hassani
with comparator = UTF8Type and key_validation_class=UTF8Type;” “update column family Test with column_metadata = [ {column_name: title, validation_class: UTF8Type}]” Though these commands had the desirable effect in thrift, in cql it causes the composite key ((key), column1) to be seen, where

Re: Multi-Column Slice Query w/ Partial Component of Composite Key

2013-12-22 Thread Edward Capriolo
You CAN only supply some of the components for a slice. On Fri, Dec 20, 2013 at 2:13 PM, Josh Dzielak j...@keen.io wrote: Is there a way to include *multiple* column names in a slice query where one only component of the composite column name key needs to match? For example, if this was a

Multi-Column Slice Query w/ Partial Component of Composite Key

2013-12-20 Thread Josh Dzielak
Is there a way to include *multiple* column names in a slice query where one only component of the composite column name key needs to match? For example, if this was a single row - username:0 | username:1 | city:0 | city:1 | other:0| other:1

too slow to generate sstable with SSTableSimpleUnsortedWriter for composite key structure

2013-09-16 Thread koray mehmet
Hi, I try to generate sstable for bulk insert. generated table for composite key is nearly x1000 times slower than single primary key. Is there a trick to speed up generation of sstable for composite key? Thanks Koray

Token Aware Routing: Routing Key Vs Composite Key with vnodes

2013-07-11 Thread Haithem Jarraya
Hi All, I am a bit confused on how the underlying token aware routing is working in the case of composite key. Let's say I have a column family like this USERS( uuid userId, text firstname, text lastname, int age, PRIMARY KEY(userId, firstname, lastname)) My question is do we need to have

Re: Token Aware Routing: Routing Key Vs Composite Key with vnodes

2013-07-11 Thread Colin Blower
users limit 10; On 07/11/2013 08:54 AM, Haithem Jarraya wrote: Hi All, I am a bit confused on how the underlying token aware routing is working in the case of composite key. Let's say I have a column family like this USERS( uuid userId, text firstname, text lastname, int age, PRIMARY KEY(userId

RE: Problem using sstableloader with SSTableSimpleUnsortedWriter and a composite key

2013-06-30 Thread Peer, Oded
Thank you Aaaron! Your blog post helped me understand how a row with a compound key is stored and this helped me understand how to create the sstable files. For anyone who needs it this is how it works: In Cassandra-cli the row looks like this: RowKey: 5 = (column=10:created,

Problem using sstableloader with SSTableSimpleUnsortedWriter and a composite key

2013-06-27 Thread Peer, Oded
Hi, I am using Cassandra 1.2.5. I built a cluster of 2 data centers with 3 nodes in each data center. I created a key space and table with a composite key: create keyspace test_keyspace WITH replication = {'class': 'NetworkTopologyStrategy', 'DC1' : 1, 'DC2' : 1}; create table test_table

Re: Problem using sstableloader with SSTableSimpleUnsortedWriter and a composite key

2013-06-27 Thread aaron morton
using Cassandra 1.2.5. I built a cluster of 2 data centers with 3 nodes in each data center. I created a key space and table with a composite key: create keyspace test_keyspace WITH replication = {'class': 'NetworkTopologyStrategy', 'DC1' : 1, 'DC2' : 1}; create table test_table ( k1 bigint

Re: Added extra column as composite key while creation counter column family

2013-04-17 Thread Robert Coli
On Tue, Apr 16, 2013 at 10:29 PM, Kuldeep Mishra kuld.cs.mis...@gmail.comwrote: cassandra 1.2.0 Is it a bug in 1.2.0 ? While I can't speak to this specific issue, 1.2.0 has meaningful known issues. I suggest upgrade to 1.2.3(/4) ASAP. =Rob

Re: Added extra column as composite key while creation counter column family

2013-04-16 Thread Kuldeep Mishra
cassandra 1.2.0 Is it a bug in 1.2.0 ? Thanks KK On Wed, Apr 17, 2013 at 2:56 AM, aaron morton aa...@thelastpickle.comwrote: What version are you using ? WIth 1.2.4 … cqlsh:dev CREATE TABLE counters ( ... key text, ... value counter, ... PRIMARY KEY (key)

Added extra column as composite key while creation counter column family

2013-04-14 Thread Kuldeep Mishra
Hi, While I creating counter column family a extra column is being added what I do ? Table creation script CREATE TABLE counters ( key text, value counter, PRIMARY KEY (key) ) WITH COMPACT STORAGE after describing column family I am getting following CREATE TABLE counters ( key text,

pycassa : composite key and UTF8Type ,DateType

2013-03-07 Thread Sloot, Hans-Peter
Hi, I have a tab separatd file with a number of columns. Columns 5 and 6 are the date as -mm-dd and hh24:mi:ss I want to add rows with a composite key that consists of an UTF8Type and the DateType (which are fields 5 and 6). The column family is : CREATE COLUMN FAMILY traffic

Re: pycassa : composite key and UTF8Type ,DateType

2013-03-07 Thread Tyler Hobbs
as -mm-dd and hh24:mi:ss I want to add rows with a composite key that consists of an UTF8Type and the DateType (which are fields 5 and 6). The column family is : CREATE COLUMN FAMILY traffic WITH comparator = 'CompositeType(UTF8Type,UTF8Type)' and key_validation_class

Re: SStable Writer and composite key

2013-01-30 Thread aaron morton
This is what a row of your table will look like internally… --- RowKey: id-value = (column=date-value:request-value:, value=, timestamp=1359586739456000) = (column=date-value:request-value:data1, value=64617461312d76616c7565, timestamp=1359586739456000) =

SStable Writer and composite key

2013-01-29 Thread POUGET Laurent
Hi, I have some trouble to request my data. I use SSTableSimpleUnsortedWriter to write SSTable. Writing and Importing works fine. I think, I'm misusing CompositeType.Builder with SSTableSimpleUnsortedWriter. Do you have any idea ? Thanks Here is my case : /** * CREATE STATEMENT */ CREATE

Creating index on part of composite key with Cassandra 1.2.0-beta1

2012-11-05 Thread Maxim Veksler
Hi, I'm attempting to build an index on a column acting as part of a composite key. This is what I have so far: CREATE TABLE userinfo2 ( campaignId int, TS timestamp, somevalue text, PRIMARY KEY (campaignId, TS) ); INSERT INTO userinfo2 (campaignId, TS

Re: Creating index on part of composite key with Cassandra 1.2.0-beta1

2012-11-05 Thread Sylvain Lebresne
On Mon, Nov 5, 2012 at 10:53 AM, Maxim Veksler ma...@vekslers.org wrote: Are indexes on composite column supported ? Index on any part of the PRIMARY KEY is not supported (whether the PRIMARY KEY is composite or not btw), not yet at least. If not, a suggestion for a work around? In your

Re: Creating index on part of composite key with Cassandra 1.2.0-beta1

2012-11-05 Thread Maxim Veksler
OK, A different question then, Is there any meaning of discussing composite key not in the context of a table primary key ? For making additional hierarchy inside a single row by using columns. On Mon, Nov 5, 2012 at 12:14 PM, Sylvain Lebresne sylv...@datastax.comwrote: On Mon, Nov 5, 2012

Create column family with Composite key column via thrift API

2012-10-11 Thread Vivek Mishra
Hi, I know one way is to execute cql query via thrift client to create a column family having compound primary/composite columns. But is it the only way? Looks like i would end up creating own CQLTranslator/Wrapper to deal with compound primary/composite columns!(Or may be something else in

Re: Importing sstable with Composite key? (without is working)

2012-10-08 Thread aaron morton
wrote: Good evening, Today i managed to get a small cluster running of 2 computers. I also managed to get my data model working and are able to import sstables created with SSTableSimpleUnsortedWriter with sstableloader. The only problem is when i try to use the composite key in my

Importing sstable with Composite key? (without is working)

2012-10-04 Thread T Akhayo
Good evening, Today i managed to get a small cluster running of 2 computers. I also managed to get my data model working and are able to import sstables created with SSTableSimpleUnsortedWriter with sstableloader. The only problem is when i try to use the composite key in my datamodel, after i

Re: Batch update efficiency with composite key

2012-07-21 Thread Sylvain Lebresne
you clarify a logical vs. physical row? Batching is useful for reducing round trips to the server. On 07/18/2012 06:18 AM, Leonid Ilyevsky wrote: I have a question about efficiency of updates to a CF with composite key. Let say I have 100 of logical rows to update, and they all belong

Re: Batch update efficiency with composite key

2012-07-20 Thread aaron morton
trips to the server. On 07/18/2012 06:18 AM, Leonid Ilyevsky wrote: I have a question about efficiency of updates to a CF with composite key. Let say I have 100 of logical rows to update, and they all belong to the same physical wide row. In my naïve understanding (correct me if I am wrong

Re: Batch update efficiency with composite key

2012-07-20 Thread Kirk True
with composite key. Let say I have 100 of logical rows to update, and they all belong to the same physical wide row. In my naïve understanding (correct me if I am wrong), in order to update a logical row, Cassandra has to retrieve the whole physical row, add columns to it, and put it back. So I

Re: Batch update efficiency with composite key

2012-07-19 Thread Kirk True
of updates to a CF with composite key. Let say I have 100 of logical rows to update, and they all belong to the same physical wide row. In my naïve understanding (correct me if I am wrong), in order to update a logical row, Cassandra has to retrieve the whole physical row, add columns to it, and put

Batch update efficiency with composite key

2012-07-18 Thread Leonid Ilyevsky
I have a question about efficiency of updates to a CF with composite key. Let say I have 100 of logical rows to update, and they all belong to the same physical wide row. In my naïve understanding (correct me if I am wrong), in order to update a logical row, Cassandra has to retrieve the whole

Re: Batch update efficiency with composite key

2012-07-18 Thread Dave Brosius
Cassandra doesn't do reads before writes. It just places the updates in memtables. In effect updates are the same as inserts.Batches certainly help with network latency, and some minor amount of code repetitiion on the server side. - Original Message -From: quot;Leonid Ilyevskyquot;

RE: Composite key in thrift java api

2012-07-06 Thread Leonid Ilyevsky
: Re: Composite key in thrift java api I would really prefer to do it in Cassandra itself, See https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/marshal/CompositeType.java Cheers - Aaron Morton Freelance Developer @aaronmorton http

Re: Composite key in thrift java api - still need help!!

2012-07-06 Thread aaron morton
concatenation) does not work for composite key case. Short length with terminating zero does not work either. So the question is: what is the required format of the key buffer? From: Leonid Ilyevsky [mailto:lilyev...@mooncapital.com] Sent: Friday, July 06, 2012 10:05 AM To: 'user

Composite key in thrift java api

2012-07-05 Thread Leonid Ilyevsky
I need to create a ByteBuffer instance containing the proper composite key, based on the values of the components of the key. I am going to use it for update operation. I tried to simply concatenate the buffers corresponding to the components, but I am not sure this is correct, because I am

Re: Composite key in thrift java api

2012-07-05 Thread aaron morton
, Leonid Ilyevsky wrote: I need to create a ByteBuffer instance containing the proper composite key, based on the values of the components of the key. I am going to use it for update operation. I tried to simply concatenate the buffers corresponding to the components, but I am not sure

composite key

2012-06-22 Thread Juan Ezquerro
Hi, I have a column family like: CREATE COLUMN FAMILY Clients WITH key_validation_class = 'CompositeType(LongType,LongType)' -- master_id,client_id AND comparator = UTF8Type AND column_metadata = [ {column_name: client_name, validation_class: UTF8Type,index_type: KEYS} ];

Re: composite key

2012-06-22 Thread Derek Williams
On Fri, Jun 22, 2012 at 11:49 AM, Juan Ezquerro j...@sofistic.net wrote: Hi, I have a column family like: CREATE COLUMN FAMILY Clients WITH key_validation_class = 'CompositeType(LongType,LongType)' -- master_id,client_id AND comparator = UTF8Type AND column_metadata = [

Re: composite key

2012-06-22 Thread dong.yajun
Hi I think you can use an ordered partitioner to store the rows in order, then, you can refer to the implementation of openTSDB which solves the timeseries data using composite key in Hbase. schema design in openTSDB: http://opentsdb.net/schema.html On Sat, Jun 23, 2012 at 9:51 AM, Derek

Re: Get few rows by composite key.

2012-03-20 Thread aaron morton
, Steve From: Michael Cherkasov [mailto:michael.cherka...@gmail.com] Sent: Monday, March 19, 2012 9:41 AM To: user@cassandra.apache.org Subject: Re: Get few rows by composite key. Also one more question: Can someone show query that will fetch all rows match to this condition: ( AA

Get few rows by composite key.

2012-03-19 Thread Michael Cherkasov
Hello, Assume that we have table like this one: Key:Columns names: AA:AA 1:A 1:B 1:C 2:A 2:C AA:BB 1:C 2:A 2:C AA:CC 2:A 2:C AA:DD 1:A 1:B 1:C BB:AA 1:A 1:B 2:C BB:BB 1:A 1:B 1:C 2:C BB:CC 1:A 2:A 2:C BB:DD 1:A 1:C 2:A 2:C Is there any way to take rows

Re: Get few rows by composite key.

2012-03-19 Thread Michael Cherkasov
Also one more question: Can someone show query that will fetch all rows match to this condition: ( AA:(part 2= BB) ) or ( key == (BB:CC) ) 2012/3/19 Michael Cherkasov michael.cherka...@gmail.com Hello, Assume that we have table like this one: Key:Columns names: AA:AA 1:A 1:B

RE: Get few rows by composite key.

2012-03-19 Thread Stephen Pope
Subject: Get few rows by composite key. Hello, Assume that we have table like this one: Key:Columns names: AA:AA 1:A 1:B 1:C 2:A 2:C AA:BB 1:C 2:A 2:C AA:CC 2:A 2:C AA:DD 1:A 1:B 1:C BB:AA 1:A 1:B 2:C BB:BB 1:A 1:B 1:C 2:C BB:CC 1:A 2:A 2:C BB:DD 1:A 1:C 2

Re: Composite Key Query in CLI

2012-03-17 Thread Tamar Fraenkel
=1331673476181001) --- The Query: get Routes['fd24a000-6d51-11e1-a260-109addb27473:4']; Returned 0 results. Elapsed time: 4 msec(s). The cli correctly identifies the composite key types if I type them wrong. From example an 'a' instead of the '4'. What am I doing wrong? Thanks

Re: CLI command for adding composite Key

2012-01-15 Thread Jérémy SEVELLEC
may be it's what you are looking for : http://planetcassandra.org/posts?page=15 ? 2012/1/13 Sunit Randhawa sunit.randh...@gmail.com Hello, Wondering how would one add Composite Keys rows using CLI. Supposing we have CF defined below: create column family ListTransactions with comparator

CLI command for adding composite Key

2012-01-13 Thread Sunit Randhawa
Hello, Wondering how would one add Composite Keys rows using CLI. Supposing we have CF defined below: create column family ListTransactions with comparator = 'CompositeType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.IntegerType)' and keys_cached=1 and

Re: Querying a composite key with cassandra-cli

2011-08-30 Thread Anthony Ikeda
, Anthony Ikeda anthony.ikeda@gmail.comwrote: Yeah I figured out what happened. I inadvertently set the keys to utf8 on the column family: assume ColumnFamily keys as utf8; which broke whichever default mechanism was in place to perform the colon separated values for the Composite key. When I

Re: Querying a composite key with cassandra-cli

2011-08-30 Thread Anthony Ikeda
Ikeda anthony.ikeda@gmail.com wrote: Yeah I figured out what happened. I inadvertently set the keys to utf8 on the column family: assume ColumnFamily keys as utf8; which broke whichever default mechanism was in place to perform the colon separated values for the Composite key

Querying a composite key with cassandra-cli

2011-08-29 Thread Anthony Ikeda
Is there currently a way to query a composite key in cassandra-cli? I was sure I used to be able to call: get ColumnFamily['comp1:comp2'] But this has recently stopped working. Anthony

Re: Querying a composite key with cassandra-cli

2011-08-29 Thread Jonathan Ellis
Sounds like you need to specify a key_validation_class so the cli knows how to encode the key. (It used to assume keys were always ascii.) On Mon, Aug 29, 2011 at 4:02 PM, Anthony Ikeda anthony.ikeda@gmail.com wrote: Is there currently a way to query a composite key in cassandra-cli? I