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 no schema changes are happeni

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 via thrift, > switch reads 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 > Cassandra-cli was used with

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 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 single ro

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

2013-12-20 Thread Josh Dzielak
Thanks Nate. I will take a look at extending thrift, seems like this could be useful for some folks. On Friday, December 20, 2013 at 12:29 PM, Nate McCall wrote: > > > > My questions – > > > > 1) Is this supported in the Thrift interface or CQL? > > Not directly, no. > > > 2) If

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

2013-12-20 Thread Nate McCall
> > > My questions – > > 1) Is this supported in the Thrift interface or CQL? > Not directly, no. > 2) If not, is there clever data modeling or indexing that could accomplish > this use case? 1 single-row round-trip to get these columns? > If this is a query done frequently you could prefix bot

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

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

2013-07-11 Thread Colin Blower
rom 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 last

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 hav

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, value=013f84be

Re: Problem using sstableloader with SSTableSimpleUnsortedWriter and a composite key

2013-06-27 Thread aaron morton
quot; wrote: > 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': > 'NetworkTopologyStrat

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, 'DC

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 wrote: > 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 wrote: > What version are you using ? > > WIth 1.2.4 … > > cqlsh:dev> CREATE TABLE counters ( >... key text, >... value counter, >... PRIMARY KEY (key) >...

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

2013-04-16 Thread aaron morton
What version are you using ? WIth 1.2.4 … cqlsh:dev> CREATE TABLE counters ( ... key text, ... value counter, ... PRIMARY KEY (key) ... ) WITH COMPACT STORAGE; cqlsh:dev> describe table counters; CREATE TABLE counters ( key text PRIMARY KEY, value counter

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,

Re: pycassa : composite key and UTF8Type ,DateType

2013-03-07 Thread Tyler Hobbs
yyy-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 = 'CompositeTyp

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 WITH

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) => (column=date-value:req

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 TAB

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 11:35 AM, Maxim Veksler wrote: > 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. > No

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 wrote: > On Mon, Nov 5, 2012 at 10

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 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 case, you're ask

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 (campaignI

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 n

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

2012-10-08 Thread aaron morton
gt; 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 com

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
don't read-then-write updates, you just write the updates. > > Sorry for being dense, but can 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

Re: Batch update efficiency with composite key

2012-07-20 Thread Kirk True
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

Re: Batch update efficiency with composite key

2012-07-20 Thread aaron morton
ng 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 to the >> same p

Re: Batch update efficiency with composite key

2012-07-19 Thread Kirk True
cy 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, an

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: "Leonid Ilyevsky" >;lilyev.

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: Composite key in thrift java api - still need help!!

2012-07-06 Thread aaron morton
> The same thing (simple 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:

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

2012-07-06 Thread Leonid Ilyevsky
case of a simple key, the key buffer in the mutation_map passed to the batch_mutate contains simple key bits, without length or terminating zero. The same thing (simple concatenation) does not work for composite key case. Short length with terminating zero does not work either. So the question

RE: Composite key in thrift java api

2012-07-06 Thread Leonid Ilyevsky
user@cassandra.apache.org Subject: 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 De

Re: Composite key in thrift java api

2012-07-05 Thread aaron morton
AM, 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, >

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

2012-06-23 Thread Juan Ezquerro
Hi, Thanks for your answer. > Cassandra's default is to store the rows randomly (using a hash of the > key), so there isn't a way of retrieving the keys that match some filter > without iterating through all of them. There are some things you can do, > like use an ordered partitioner to store th

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: composite key

2012-06-22 Thread Derek Williams
On Fri, Jun 22, 2012 at 11:49 AM, Juan Ezquerro 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 = [ > {column

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} ]; Th

Re: Get few rows by composite key.

2012-03-20 Thread aaron morton
and the second is a fetch. > > Cheers, > 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: > Ca

RE: Get few rows by composite key.

2012-03-19 Thread Stephen Pope
Those are going to have to be separate queries, since the first is a slice, and the second is a fetch. Cheers, 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

RE: Get few rows by composite key.

2012-03-19 Thread Stephen Pope
apache.org 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:

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 > 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

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 wi

Re: Composite Key Query in CLI

2012-03-17 Thread Tamar Fraenkel
timestamp=1331673476181000) > => (column=providerId, value=0086b6c0-6d52-11e1-a260-109addb27473, > timestamp=1331673476181001) > --- > > > The Query: > > get Routes['fd24a000-6d51-11e1-a260-109addb27473:4']; > Returned 0 results. > Elapsed

Composite Key Query in CLI

2012-03-13 Thread Ali Basiri
psed 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 > Hello, > > Wondering how would one add Composite Keys rows using CLI. Supposing we > have CF defined below: > > create column family ListTransactions > with comparator = > 'CompositeTyp

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 rows_cache

Re: Querying a composite key with cassandra-cli

2011-08-30 Thread Anthony Ikeda
ssume ColumnFamily keys as utf8; > >> which broke whichever default mechanism was in place to perform the > colon > >> separated values for the Composite key. When I restarted cassandra-cli, > the > >> query worked again. > >> Any idea what type the key is on a C

Re: Querying a composite key with cassandra-cli

2011-08-30 Thread Jonathan Ellis
tly 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 restarted cassandra-cli, the >> query worked again. &g

Re: Querying a composite key with cassandra-cli

2011-08-30 Thread Anthony Ikeda
29, 2011 at 2:35 PM, Anthony Ikeda 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 value

Re: Querying a composite key with cassandra-cli

2011-08-29 Thread Anthony Ikeda
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 restarted cassandra-cli, the query worked again

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 wrote: > Is there currently a way to query a composite key in cassandra-cli? > I was sure I used to b

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