Re: Alter composite column

2018-01-18 Thread Alexander Dejanovski
Compact storage only allows one column outside of the primary key so you'll definitely need to recreate your table if you want to add columns. Le jeu. 18 janv. 2018 à 12:18, Nicolas Guyomar a écrit : > Well it should be as easy as following this : > https://docs.datastax.com/en/cql/3.1/cql/cql_u

Re: Alter composite column

2018-01-18 Thread Joel Samuelsson
Yeah, I want column4 to appear in each cell name (rather than just once) which I think would be the same as altering the primary key. 2018-01-18 12:18 GMT+01:00 Nicolas Guyomar : > Well it should be as easy as following this : https://docs.datastax.com/ > en/cql/3.1/cql/cql_using/use_alter_add.ht

Re: Alter composite column

2018-01-18 Thread Nicolas Guyomar
Well it should be as easy as following this : https://docs.datastax.com/en/cql/3.1/cql/cql_using/use_alter_add.html But I'm worried that your initial requirement was to change the clustering key, as Alexander stated, you need to create a new table and transfer your data in it On 18 January 2018 a

Re: Alter composite column

2018-01-18 Thread Joel Samuelsson
It was indeed created with C* 1.X Do you have any links or otherwise on how I would add the column4? I don't want to risk destroying my data. Best regards, Joel 2018-01-18 11:18 GMT+01:00 Nicolas Guyomar : > Hi Joel, > > You cannot alter a table primary key. > > You can however alter your existi

Re: Alter composite column

2018-01-18 Thread Nicolas Guyomar
Hi Joel, You cannot alter a table primary key. You can however alter your existing table to only add column4 using cqlsh and cql, even if this table as created back with C* 1.X for instance On 18 January 2018 at 11:14, Joel Samuelsson wrote: > So to rephrase that in CQL terms I have a table li

Re: Alter composite column

2018-01-18 Thread Alexander Dejanovski
Hi Joel, Sadly it's not possible to alter the primary key of a table in Cassandra. That would require to rewrite all data on disk to match the new partitioning and/or clustering. You need to create a new table and transfer all data from the old one programmatically. Cheers, Le jeu. 18 janv. 201

Re: Alter composite column

2018-01-18 Thread Joel Samuelsson
So to rephrase that in CQL terms I have a table like this: CREATE TABLE events ( key text, column1 int, column2 int, column3 text, value text, PRIMARY KEY(key, column1, column2, column3) ) WITH COMPACT STORAGE and I'd like to change it to: CREATE TA

Alter composite column

2018-01-12 Thread Joel Samuelsson
Hi, I have an older system (C* 2.1) using Thrift tables on which I want to alter a column composite. Right now it looks like (int, int, string) but I want it to be (int, int, string, string). Is it possible to do this on a live cluster without deleting the old data? Can you point me to some docume

Re: Composite Column Grouping

2013-09-11 Thread Laing, Michael
Here's a slightly better version and a python script. -ml -- put this in and run using 'cqlsh -f DROP KEYSPACE latest; CREATE KEYSPACE latest WITH replication = { 'class': 'SimpleStrategy', 'replication_factor' : 1 }; USE latest; CREATE TABLE time_series ( bucket_userid text, --

Re: Composite Column Grouping

2013-09-11 Thread Laing, Michael
Then you can do this. I handle millions of entries this way and it works well if you are mostly interested in recent activity. If you need to span all activity then you can use a separate table to maintain the 'latest'. This table should also be sharded as entries will be 'hot'. Sharding will spre

Re: Composite Column Grouping

2013-09-10 Thread Ravikumar Govindarajan
Thanks Michael, But I cannot sort the rows in memory, as the number of columns will be quite huge. >From the python script above: select_stmt = "select * from time_series where userid = 'XYZ'" This would return me many hundreds of thousands of columns. I need to go in time-series order using

Re: Composite Column Grouping

2013-09-10 Thread Laing, Michael
If you have set up the table as described in my previous message, you could run this python snippet to return the desired result: #!/usr/bin/env python # -*- coding: utf-8 -*- import logging logging.basicConfig() from operator import itemgetter import cassandra from cassandra.cluster import Clus

Re: Composite Column Grouping

2013-09-10 Thread Laing, Michael
You could try this. C* doesn't do it all for you, but it will efficiently get you the right data. -ml -- put this in and run using 'cqlsh -f DROP KEYSPACE latest; CREATE KEYSPACE latest WITH replication = { 'class': 'SimpleStrategy', 'replication_factor' : 1 }; USE latest; CREATE TA

Composite Column Grouping

2013-09-10 Thread Ravikumar Govindarajan
I have been faced with a problem of grouping composites on the second-part. Lets say my CF contains this TimeSeriesCF key:UserID composite-col-name:TimeUUID:PKID Some sample data UserID = XYZ

Re: Pycassa xget not parsing composite column name properly

2013-06-17 Thread Tyler Hobbs
That looks correct, and I just double checked that xget behaves normally for me for that case. What does it actually print? Can you try not unpacking the tuple in your inner for-loop and print that? Also, there's a pycassa mailing list (pycassa-disc...@googlegroups.com) that would be a better lo

Pycassa xget not parsing composite column name properly

2013-06-16 Thread Oleg Dulin
I have a column family defined as: create column family LSItemIdsByFieldValueIndex_Integer with column_type = 'Standard' and comparator = 'CompositeType(org.apache.cassandra.db.marshal.IntegerType,org.apache.cassandra.db.marshal.UTF8Type)' and default_validation_class = 'UTF8Type' and key

Re: composite column validation_class question

2012-11-13 Thread Manu Zhang
gt; >> >> -- >> *From:* Wei Zhu >> *To:* Cassandr usergroup >> *Sent:* Wednesday, November 7, 2012 12:47 PM >> *Subject:* composite column validation_class question >> >> Hi All, >> I am trying to design my schema us

Re: composite column validation_class question

2012-11-13 Thread Tyler Hobbs
> Any thoughts? > > Thanks. > -Wei > > > -- > *From:* Wei Zhu > *To:* Cassandr usergroup > *Sent:* Wednesday, November 7, 2012 12:47 PM > *Subject:* composite column validation_class question > > Hi All, > I am trying to design my schem

Re: composite column validation_class question

2012-11-08 Thread Wei Zhu
Any thoughts? Thanks. -Wei From: Wei Zhu To: Cassandr usergroup Sent: Wednesday, November 7, 2012 12:47 PM Subject: composite column validation_class question Hi All, I am trying to design my schema using composite column. One thing I am a bit confused

Re: How to insert composite column in CQL3?

2012-11-08 Thread Alan Ristić
Ok, this article answered all the confusion in my head: http://www.datastax.com/dev/blog/thrift-to-cql3 It's a must read for noobs (like me). It perfectly explains mappings and diffs between internals and CQL3(abstractions). First read this and THEN go study all the resources out there ;) Lp, Ala

How to insert composite column in CQL3?

2012-11-08 Thread Alan Ristić
Hi there! I'm strugguling to figure out (for quite few hours now) how can I insert for example column with TimeUUID name and empy value in CQL3 in fictional table. And what's the table design? I'm interested in syntax (e.g. example). I'm trying to do something like Matt Dennis did here (*Cassandr

composite column validation_class question

2012-11-07 Thread Wei Zhu
Hi All, I am trying to design my schema using composite column. One thing I am a bit confused is how to define validation_class for the composite column, or is there a way to define it? for the composite column, I might insert different value based on the column name, for example I will insert

Re: Create CF with composite column through CQL 3

2012-10-31 Thread Wei Zhu
Thanks Tristan and Sylvain, it all makes sense now.  One follow up question regarding the composite column. It seems that for the where clause I can only restrict the query on the first composite column (friend_id, in my case). I understand it's determined by the underlining row st

Re: Create CF with composite column through CQL 3

2012-10-31 Thread Tristan Seligmann
On Wed, Oct 31, 2012 at 7:14 PM, Wei Zhu wrote: > I try to use CQL3 to create CF with composite columns, > > CREATE TABLE Friends ( > ... user_id bigint, > ... friend_id bigint, > ... status int, > ... source int, > ... created time

Re: Create CF with composite column through CQL 3

2012-10-31 Thread Timmy Turner
CQL3 handles columns/rows/keys differently than Cassandra itself underneath. If you look closely you'll see that your real primary key is in fact only a Long: > Key Validation Class: org.apache.cassandra.db.marshal.LongType If you want to know more about it, check these 2 articles: http://

Re: Create CF with composite column through CQL 3

2012-10-31 Thread Sylvain Lebresne
You didn't do anything wrong, it's how CQL3 works. I suggest having a look at http://www.datastax.com/dev/blog/thrift-to-cql3. Especially the section called "Non compact tables" might hopefully explains more. -- Sylvain On Wed, Oct 31, 2012 at 6:14 PM, Wei Zhu wrote: > I try to use CQL3 to creat

Create CF with composite column through CQL 3

2012-10-31 Thread Wei Zhu
I try to use CQL3 to create CF with composite columns,  CREATE TABLE Friends (          ...     user_id bigint,          ...     friend_id bigint,          ...     status int,          ...     source int,          ...     created timestamp,          ...     lastupdated timestamp,          ...    

Re: Missing non composite column

2012-10-22 Thread Vivek Mishra
Anybody in group got into such issues? -Vivek On Fri, Oct 19, 2012 at 3:28 PM, Vivek Mishra wrote: > Ok. I did assume the same, here is what i have tried to fetch composite > columns via thrift and CQL query as well! > > Not sure why thrift API is returning me column name as empty! (Tried with

Re: Missing non composite column

2012-10-19 Thread Vivek Mishra
Ok. I did assume the same, here is what i have tried to fetch composite columns via thrift and CQL query as well! Not sure why thrift API is returning me column name as empty! (Tried with Cassandra 1.1.5) Here is the program: /

Re: Missing non composite column

2012-10-18 Thread aaron morton
>> Yes, i understand that. Reason why i am asking is, with this i need to split >> them to get actual column name using ":" as a seperator. The ":" is a artefact of the cassandra-cli, nothing something you will have to deal with via the thrift API. Internally we do not store the values with ":" s

Re: Missing non composite column

2012-10-17 Thread Sylvain Lebresne
> Yes, i understand that. Reason why i am asking is, with this i need to split > them to get actual column name using ":" as a seperator. > Though i did not try it yet, but wondering if column name is like > "alliance:movement", then how do it compute it? You've lost me, sorry. -- Sylvain > > >

Re: Missing non composite column

2012-10-17 Thread Vivek Mishra
Yes, i understand that. Reason why i am asking is, with this i need to split them to get actual column name using ":" as a seperator. Though i did not try it yet, but wondering if column name is like "alliance:movement", then how do it compute it? On Wed, Oct 17, 2012 at 1:04 PM, Sylvain Lebresne

Re: Missing non composite column

2012-10-17 Thread Sylvain Lebresne
On Wed, Oct 17, 2012 at 3:17 AM, Vivek Mishra wrote: > column name will be "2012-07-24:2:alliance_involvement" or > "alliance_involvement"? The former. Though let's clarify that "2012-07-24:2:alliance_involvement" is the string representation of a composite name (i.e. one compatible with Composit

Re: Missing non composite column

2012-10-16 Thread Vivek Mishra
column name will be "2012-07-24:2:alliance_involvement" or "alliance_involvement"? -Vivek On Tue, Oct 16, 2012 at 10:25 PM, Sylvain Lebresne wrote: > On Tue, Oct 16, 2012 at 12:31 PM, Vivek Mishra > wrote: > > Thanks Sylvain. I missed it. If i try to access these via thrift API, > what > > will

Re: Missing non composite column

2012-10-16 Thread Sylvain Lebresne
On Tue, Oct 16, 2012 at 12:31 PM, Vivek Mishra wrote: > Thanks Sylvain. I missed it. If i try to access these via thrift API, what > will be the column names? I'm not sure I understand the question. The cli output is pretty much what you get via the thrift API. -- Sylvain

Re: Missing non composite column

2012-10-16 Thread Vivek Mishra
vek Mishra > wrote: > > --- > > RowKey: Jayne Cobb > > => (column=2012-07-24:2:alliance_involvement, value=false, > > timestamp=135038100502) > > => (column=2012-07-24:2:energy_used, value=4.6, > timestamp=1350381005020001) > > &g

Re: Missing non composite column

2012-10-16 Thread Sylvain Lebresne
; > Not sure, why is it not getting non-composite column(e.g. ships_destroyed in > this case). You have all the data in there. The ships_destroyed is the second component of each of your column names. That's just the way CQL3 encodes things underneath. -- Sylvain

Re: Composite Column Types Storage

2012-09-20 Thread Sylvain Lebresne
> As I understand from the link below, burning column index-info onto the > sstable index files will not only eliminate sstables but also reduce disk > seeks from 3 to 2 for wide rows. Yes. > Shouldn't we be wary of the spike in heap usage by promoting column indexes > to index file? If you're t

Re: Composite Column Types Storage

2012-09-20 Thread Ravikumar Govindarajan
ds good for composite columns. > Currently, > composite column name are completely opaque to the storage engine. > > > alone could have gone into the bloom-filter, speeding up > my > > queries really effectively > > True, though https://issues.apache.org/jira/browse/CASSANDRA-2

Re: Composite Column Types Storage

2012-09-18 Thread Sylvain Lebresne
> Range queries do not use bloom filters. It holds good for composite-columns > also right? Since I assume you are referring to column's bloom filters (key's bloom filters are always used) then yes, that holds good for composite columns. Currently, composite column name are comp

Re: Composite Column Types Storage

2012-09-18 Thread aaron morton
n bloom filters when I specify an absolute value for Part1 of the > composite column and a start/end value for Part2 of the composite column > > It is slowly dawning on me that I need a super-column to use column blooms > effectively and at the same time don't want the entire

Re: Composite Column Types Storage

2012-09-17 Thread Ravikumar Govindarajan
Yes Aaron, I was not clear about Bloom Filters. I was thinking about the column bloom filters when I specify an absolute value for Part1 of the composite column and a start/end value for Part2 of the composite column It is slowly dawning on me that I need a super-column to use column blooms

Re: Composite Column Query Modeling

2012-09-16 Thread aaron morton
> Freelance Developer > @aaronmorton > http://www.thelastpickle.com > > On 14/09/2012, at 8:31 AM, Adam Holmberg wrote: > >> I'm modeling a new application and considering the use of SuperColumn vs. >> Composite Column paradigms. I understand that SuperColumns are d

Re: Composite Column Query Modeling

2012-09-14 Thread Hiller, Dean
;user@cassandra.apache.org<mailto:user@cassandra.apache.org>" mailto:user@cassandra.apache.org>> Date: Friday, September 14, 2012 9:08 AM To: "user@cassandra.apache.org<mailto:user@cassandra.apache.org>" mailto:user@cassandra.apache.org>> Subject: Re: Comp

Re: Composite Column Query Modeling

2012-09-14 Thread Adam Holmberg
--- > Aaron Morton > Freelance Developer > @aaronmorton > http://www.thelastpickle.com > > On 14/09/2012, at 8:31 AM, Adam Holmberg > wrote: > > I'm modeling a new application and considering the use of SuperColumn vs. > Composite Column paradigms. I understan

Re: Composite Column Query Modeling

2012-09-14 Thread aaron morton
/blog/cql3_collections Hope that helps. - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 14/09/2012, at 8:31 AM, Adam Holmberg wrote: > I'm modeling a new application and considering the use of SuperColumn vs. > Composite Column p

Re: Composite Column Types Storage

2012-09-13 Thread aaron morton
in disk > > Yes, each combination is stored separately on disk (the storage engine > itself doesn't have special casing for composite column, at least not > yet). But as far as disk space is concerned, I suspect that sstable > compression makes this largely a non issue. > > -- > Sylvain >

Composite Column Query Modeling

2012-09-13 Thread Adam Holmberg
I'm modeling a new application and considering the use of SuperColumn vs. Composite Column paradigms. I understand that SuperColumns are discouraged in new development, but I'm pondering a query where it seems like SuperColumns might be better suited. Consider a CF with SuperColumn

Re: Composite Column Types Storage

2012-09-12 Thread Ravikumar Govindarajan
ely in disk > > Yes, each combination is stored separately on disk (the storage engine > itself doesn't have special casing for composite column, at least not > yet). But as far as disk space is concerned, I suspect that sstable > compression makes this largely a non issue. > > -- > Sylvain >

Re: Composite Column Types Storage

2012-09-12 Thread Sylvain Lebresne
> Is every / combination stored separately in disk Yes, each combination is stored separately on disk (the storage engine itself doesn't have special casing for composite column, at least not yet). But as far as disk space is concerned, I suspect that sstable compression makes this large

Re: Composite Column Slice query, wildcard first component?

2012-08-15 Thread aaron morton
> Is there a way to create a slice query that returns all columns where the > _second_ component is A? No. You can only get a contiguous slice of columns. Cheers - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 16/08/2012, at 7:21 AM, Mike Hugo

Composite Column Slice query, wildcard first component?

2012-08-15 Thread Mike Hugo
Hello, Given a row like this "key1" => (A:A:C), (A:A:B), (B:A:C), (B:C:D) Is there a way to create a slice query that returns all columns where the _second_ component is A? That is, I would like to get back the following columns by asking for columns where component[0] = * and component[1] = A

Re: Composite Column Expiration Behavior

2012-07-18 Thread Thomas Van de Velde
d, Jul 18, 2012 at 11:06 AM, rohit bhatia wrote: > Hi, > > I don't think that composite columns have "parent columns". your point > might be true for supercolumns .. > but each composite column is probably independent.. > > On Wed, Jul 18, 2012 at 9:14 PM, Thomas V

Re: Composite Column Expiration Behavior

2012-07-18 Thread rohit bhatia
Hi, I don't think that composite columns have "parent columns". your point might be true for supercolumns .. but each composite column is probably independent.. On Wed, Jul 18, 2012 at 9:14 PM, Thomas Van de Velde wrote: > Hi there, > > I am trying to understand th

Bulk Loading with Composite Column Slow?

2012-07-16 Thread Brian Reynolds
Hi I'm using Cassandra 1.1.0 from Datastax and attempting to load a ColumnFamily with a single column with a Composite name. It seems to load ok, but is much slower than similar code without the composite column. I tried building the Composite outside the while loop and just copying it b

Re: Composite column/key creation via Hector

2012-07-12 Thread Dave Brosius
Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 12/07/2012, at 9:04 AM, Michael Cherkasov wrote: Hi all, What is the right way to create CF with dynamic composite column and composite key? Now I use code like this: private static final String DEFAULT_DYNAMIC_COMPOSITE_

Re: Composite column/key creation via Hector

2012-07-12 Thread aaron morton
Freelance Developer @aaronmorton http://www.thelastpickle.com On 12/07/2012, at 9:04 AM, Michael Cherkasov wrote: > Hi all, > > What is the right way to create CF with dynamic composite column and > composite key? > > Now I use code like this: > > pri

Re: Composite Column

2012-05-17 Thread samal
zCassandra data model is best known for demoralize data. You must have entry for column name in other column family. Example is just for posterity, you should not put everything in single row, very inefficient. I do not use composite column. The way I do and others do is use complex column

Re: Composite Column

2012-05-16 Thread Abhijit Chanda
mail.com> wrote: > >> Aaron, >> >> Actually Aaron i am looking for a scenario on super columns being >> replaced by composite column. >> Say this is a data model using super column >> rowKey{ >> superKey

Re: Composite Column

2012-05-16 Thread samal
n numbers of column]"* comaprator=CompositeType(UTF8Type1,UTF8Type2,...,n) /Samal On Thu, May 17, 2012 at 10:40 AM, Abhijit Chanda wrote: > Aaron, > > Actually Aaron i am looking for a scenario on super columns being replaced > by composite column. > Say this is a data

Re: Composite Column

2012-05-16 Thread Abhijit Chanda
Aaron, Actually Aaron i am looking for a scenario on super columns being replaced by composite column. Say this is a data model using super column rowKey{ superKey1 { Name, Address, City

Re: Composite Column

2012-05-16 Thread aaron morton
rote: > I have not used CC but yes you can. > Below is not composite column. It is not not column with JSON hash value. > Column value can be anything you like. > date inside value are not indexed. > > > On Tue, May 15, 2012 at 9:27 AM, Abhijit Chanda > wrote: > Is i

Re: Composite Column

2012-05-15 Thread samal
It is just column with JSON value On Tue, May 15, 2012 at 4:00 PM, samal wrote: > I have not used CC but yes you can. > Below is not composite column. It is not not column with JSON hash value. > Column value can be anything you like. > date inside value are not indexed. > >

Re: Composite Column

2012-05-15 Thread samal
I have not used CC but yes you can. Below is not composite column. It is not not column with JSON hash value. Column value can be anything you like. date inside value are not indexed. On Tue, May 15, 2012 at 9:27 AM, Abhijit Chanda wrote: > Is it possible to create this data model with the h

Re: problem with sliceQuery with composite column

2012-02-16 Thread Deno Vichas
tting 111:ticks 111:quote 222:ticks 222:quote 333:ticks 333:quote 444:ticks If that is the case things are working as expected. The slice operation gets a column range. So if you start at 111:ticks and end at 444:ticks you are asking for all the column in between. it is not possible to fi

Re: problem with sliceQuery with composite column

2012-02-16 Thread Deno Vichas
case things are working as expected. The slice operation gets a column range. So if you start at 111:ticks and end at 444:ticks you are asking for all the column in between. it is not possible to filter at each level of a composite column. Hope that helps. - Aaron Morton Free

Re: problem with sliceQuery with composite column

2012-02-16 Thread aaron morton
> but it still seem a bit strange coming from years and years of sql. Think of the composite column name as a composite key. You want to write an efficient query that uses a seek and partial scan of the index b-tree, rather than a full scan. > split this CF into two? Or change the or

Re: problem with sliceQuery with composite column

2012-02-16 Thread Deno Vichas
and end at 444:ticks you are asking for all the column in between. it is not possible to filter at each level of a composite column. Hope that helps. - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 10/02/2012, at 10:58 PM, Deno Vichas wrote: all

Re: problem with sliceQuery with composite column

2012-02-13 Thread aaron morton
If you want to get all the tick between two integers yes. A - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 14/02/2012, at 8:36 AM, Dave Brosius wrote: > if the composite column was rearranged as > > ticks:111 > > wouldn

Re: problem with sliceQuery with composite column

2012-02-13 Thread Dave Brosius
if the composite column was rearranged as ticks:111wouldn't the result be as desired? - Original Message -From: "aaron morton" >;aa...@thelastpickle.com

Re: problem with sliceQuery with composite column

2012-02-13 Thread aaron morton
111:ticks and end at 444:ticks you are asking for all the column in between. it is not possible to filter at each level of a composite column. Hope that helps. - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 10/02/2012, at 10:58 PM, Deno Vichas

problem with sliceQuery with composite column

2012-02-10 Thread Deno Vichas
all, could somebody clue me to why the below code doesn't work. my schema is; create column family StockHistory with comparator = 'CompositeType(LongType,UTF8Type)' and default_validation_class = 'UTF8Type' and key_validation_class = 'UTF8Type'; the time part works but i'm gettin

Re: Composite column docs

2012-01-07 Thread aaron morton
> It is a sweet documentation but it doesn't help me. I a lower level > documntation Read the docs and then read the code to see how it works in pycassa. Otherwise if you want low level docs the cassandra code is the place to go. Cheers - Aaron Morton Freelance Developer @aaron

Re: Composite column docs

2012-01-06 Thread Shimi Kiviti
On Thu, Jan 5, 2012 at 9:13 PM, aaron morton wrote: > What client are you using ? > I am writing a client. > For example pycassa has some sweet documentation > http://pycassa.github.com/pycassa/assorted/composite_types.html > It is a sweet documentation but it doesn't help me. I a lower level do

Re: Composite column docs

2012-01-05 Thread aaron morton
What client are you using ? For example pycassa has some sweet documentation http://pycassa.github.com/pycassa/assorted/composite_types.html Cheers - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 6/01/2012, at 12:48 AM, Shimi Kiviti wrote: > Is

Composite column docs

2012-01-05 Thread Shimi Kiviti
Is there a doc for using composite columns with thrift? Is https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/marshal/CompositeType.java the only doc? does the client needs to add the length to the get \ get_slice... queries or is it taken care of on the server side? S

Re: Composite column names: How much space do they occupy ?

2012-01-02 Thread Ertio Lew
pache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/marshal/CompositeType.java > >> > >> Hope that helps. > >> Aaron > >> > >> - > >> Aaron Morton > >> Freelance Developer > >> @aaronmorton > >&g

Re: Composite column names: How much space do they occupy ?

2012-01-02 Thread Sylvain Lebresne
/blob/trunk/src/java/org/apache/cassandra/db/marshal/CompositeType.java >> >> Hope that helps. >> Aaron >> >> - >> Aaron Morton >> Freelance Developer >> @aaronmorton >> http://www.thelastpickle.com >> >> On 2/01/2012, at 6:

Re: Composite column names: How much space do they occupy ?

2012-01-02 Thread Ertio Lew
- > Aaron Morton > Freelance Developer > @aaronmorton > http://www.thelastpickle.com > > On 2/01/2012, at 6:25 PM, Ertio Lew wrote: > > I am storing composite column names which are made up of two integer > components. However I am shocked after seeing the

Re: Composite column names: How much space do they occupy ?

2012-01-02 Thread aaron morton
Developer @aaronmorton http://www.thelastpickle.com On 2/01/2012, at 6:25 PM, Ertio Lew wrote: > I am storing composite column names which are made up of two integer > components. However I am shocked after seeing the storage overhead of these. > > I just tried out a composite name

Composite column names: How much space do they occupy ?

2012-01-01 Thread Ertio Lew
I am storing composite column names which are made up of two integer components. However I am shocked after seeing the storage overhead of these. I just tried out a composite name (with single integer component): Composite composite = new Composite(); composite.addComponent

Re: Composite Column Question

2011-12-21 Thread Sylvain Lebresne
On Wed, Dec 21, 2011 at 7:04 AM, Martin Arrowsmith wrote: > Dear Cassandra Experts, > > Are the number of composite attributes fixed for each column family ? > > I have been doing : "create column family MyCF with comparator = > 'CompositeType(IntegerType, UTF8Type)' > > And this creates a composi

Composite Column Question

2011-12-20 Thread Martin Arrowsmith
Dear Cassandra Experts, Are the number of composite attributes fixed for each column family ? I have been doing : "create column family MyCF with comparator = 'CompositeType(IntegerType, UTF8Type)' And this creates a composite { integer:string } Hector complains when I give a 3rd attribute. If

Re: Composite Column Queries with Hector

2011-12-19 Thread aaron morton
sing Hector to implement and query information from Composite Columns. > > I found this site to be quite useful: > http://randomizedsort.blogspot.com/2011/11/cassandra-range-query-using.html > > It goes through the steps of creating a composite column, to perform simple > quer

Composite Column Queries with Hector

2011-12-19 Thread Martin Arrowsmith
Dear Cassandra and Hector experts, I am using Hector to implement and query information from Composite Columns. I found this site to be quite useful: http://randomizedsort.blogspot.com/2011/11/cassandra-range-query-using.html It goes through the steps of creating a composite column, to perform

Re: cassandra-cli: Create column family with composite column name

2011-10-05 Thread aaron morton
Hi Jim, The best resource I know so far is http://www.slideshare.net/edanuff/indexing-in-cassandra I just started working on a blog post about them last night, and I hope to update the wiki with some information when I am done. Feel free to mail me directly if you want to collaborate. I'm

cassandra-cli: Create column family with composite column name

2011-10-05 Thread Jim Ancona
Using Cassandra 0.8.6, I've been trying to figure out how to use the CLI to create column families using composite keys and column names. The documentation on CompositeType seems pretty skimpy. But in the course of writing this email to ask how to do it, I figured out the proper syntax. In the hope

Re: Search over composite Column and Super Column name

2011-09-22 Thread Konstantin Naryshkin
t; . This works because ; is the character right after : in ASCII. I believe that UNICODE is ordered similarly to ASCII, though I am not 100% sure on that issue. - Original Message - From: "Renato Costa" To: user@cassandra.apache.org Sent: Thursday, September 22, 2011 6:35

Search over composite Column and Super Column name

2011-09-22 Thread Renato Costa
Hi, I started do modeling my application over cassandra data model. I will have to use composite Super columns name, i.e. "username:userid", i know that is a lot of different ways to deal with this case, but once i have modeled with composite Super Columns name is there any way to make a sarch ove

Re: Using composite column names in the CLI

2011-05-17 Thread Sylvain Lebresne
x27;constituent3'] = val >> > >> > >> > On Tue, May 17, 2011 at 2:15 AM, Sameer Farooqui >> > >> > wrote: >> >> >> >> Cassandra wouldn't know that the column name is composite of two >> >> different >

Re: Using composite column names in the CLI

2011-05-17 Thread David Boxenhorn
gt; >> things. So you could just request the column names and values for a > specific > >> key like this and then just look at the column names that get returned: > >> [default@MyKeyspace] get DemoCF[ascii('key_42')]; > >> => (column=CA_SanJose, value=50, tim

Re: Using composite column names in the CLI

2011-05-17 Thread Sylvain Lebresne
lt@MyKeyspace] get DemoCF[ascii('key_42')]; >> => (column=CA_SanJose, value=50, timestamp=1305236885112000) >> => (column=CA_PaloAlto, value=49, timestamp=1305236885192000) >> => (column=FL_Orlando, value=45, timestamp=130523688528) >> => (column=N

Re: Using composite column names in the CLI

2011-05-17 Thread David Boxenhorn
tamp=130523688528) > => (column=NY_NYC, value=40, timestamp=1305236885361000) > > > And I'm not sure what you mean by inputting composite column names. You > just input them like any other column name: > > [default@MyKeyspace] set DemoCF['key_42']['CA_S

Re: Using composite column names in the CLI

2011-05-16 Thread Sameer Farooqui
(column=CA_SanJose, value=50, timestamp=1305236885112000) => (column=CA_PaloAlto, value=49, timestamp=1305236885192000) => (column=FL_Orlando, value=45, timestamp=130523688528) => (column=NY_NYC, value=40, timestamp=1305236885361000) And I'm not sure what you mean by inputting

Re: Using composite column names in the CLI

2011-05-16 Thread Aaron Morton
What do you mean by composite column names? Do the data type functions supported by get and set help? Or the assume statement? Aaron On 17/05/2011, at 3:21 AM, David Boxenhorn wrote: > Is there a way to view composite column names in the CLI? > > Is there a way to input them (i.e. i

Using composite column names in the CLI

2011-05-16 Thread David Boxenhorn
Is there a way to view composite column names in the CLI? Is there a way to input them (i.e. in the set command)?

Re: Multiget_slice or composite column keys?

2011-05-16 Thread Charles Blaxland
Thanks Aaron, very useful. I'll give some of your suggestions a go... On 16 May 2011 19:13, aaron morton wrote: > I'd stick with the RandomPartitioner until you have a really good reason to > change :) > > I'd also go with your alternative design with some possible tweaks. > > Consider partition

Re: Multiget_slice or composite column keys?

2011-05-16 Thread aaron morton
I'd stick with the RandomPartitioner until you have a really good reason to change :) I'd also go with your alternative design with some possible tweaks. Consider partitioning the rows by year or some other sensible value. If you will generally be getting the most recent data this can reduce

Multiget_slice or composite column keys?

2011-05-15 Thread Charles Blaxland
Hi All, New to Cassandra, so apologies if I don't fully grok stuff just yet. I have data keyed by a key as well as a date. I want to run a query to get multiple keys across multiple contiguous date ranges simultaneously. I'm currently storing the date along with the row key like this: key1|2011-