list of columns

2010-05-13 Thread Bill de hOra
Admin question - is there a way to list the columns for a particular key? Bill

Re: Rolling upgrade

2010-05-13 Thread Tatsuya Kawano
Hi Gary, Thanks for answering my question. I thought that could be a tough question as Cassandra is quickly evolving recently, but it was great to know that you guys are always trying to make rolling upgrade possible for minor upgrades. My friend is evaluating Cassandra as an HA alterati

Re: Is it possible to delete records based upon where condition

2010-05-13 Thread Moses Dinakaran
Hi Thanks for the answers, we are planning to run a cron job that fetches the record and deletes one by one. A post which gives more details on this http://www.mail-archive.com/cassandra-u...@incubator.apache.org/msg02610.html Regards, Moses. On 5/13/10, Joel Pitt wrote: > On Thu, May 13, 2010 a

Re: list of columns

2010-05-13 Thread Gary Dusbabek
We have get_count at the thrift level. You supply a predicate and it returns the number of columns that match. There is also multi_get_count, which is the same operation against multiple keys. Gary. On Thu, May 13, 2010 at 04:18, Bill de hOra wrote: > Admin question - is there a way to list t

Re: list of columns

2010-05-13 Thread Bill de hOra
get_count returns the number of columns, not the names of those columns? I should have been specific, by "list the columns", I meant "list the column names". Bill Gary Dusbabek wrote: We have get_count at the thrift level. You supply a predicate and it returns the number of columns that matc

Re: list of columns

2010-05-13 Thread Jonathan Shook
get_slice see: http://wiki.apache.org/cassandra/API under get_slice and SlicePredicate On Thu, May 13, 2010 at 9:45 AM, Bill de hOra wrote: > get_count returns the number of columns, not the names of those columns? I > should have been specific, by "list the columns", I meant "list the column >

Re: how does cassandra compare with mongodb?

2010-05-13 Thread Vijay
"Cassandra requires the schema to be defined before the database starts, MongoDB can have any schema at run-time just like a normal database." This is changing in 0.7 Regards, On Wed, May 12, 2010 at 7:25 PM, Jonathan Shook wrote: > You can choose to have keys ordered by using an > OrderPre

Re: how does cassandra compare with mongodb?

2010-05-13 Thread Sandeep Kalidindi
Any idea about how far the 0.7 release is ?? Cheers, Deepu. On Thu, May 13, 2010 at 10:52 PM, Vijay wrote: > "Cassandra requires the schema to be defined before the database starts, > MongoDB can have any schema at run-time just like a normal database." > > This is changing in 0.7 > > Regards,

Re: how does cassandra compare with mongodb?

2010-05-13 Thread Roger Schildmeijer
In a perfect world there should be (aiming for) a new major Cassandra release every 2-3 months. // Roger Schildmeijer On 13 maj 2010, at 19.43em, Sandeep Kalidindi wrote: > Any idea about how far the 0.7 release is ?? > > Cheers, > Deepu. > > On Thu, May 13, 2010 at 10:52 PM, Vijay wrote:

Handling failures in Thrift

2010-05-13 Thread Ian Soboroff
I searched the Wiki and the mailing list archives a bit but couldn't find the answer. If I catch an exception from a Cassandra.Client method, in my case batch_mutate, what's the proper course of action? Ignoring InvalidRequestException, we have Unavailable, TimedOut, and generic Thrift exception

Re: Handling failures in Thrift

2010-05-13 Thread Roger Schildmeijer
All the Exceptions are documented on the API page (http://wiki.apache.org/cassandra/API) on the wiki. * UnavailableException -- "Not all the replicas required could be created and/or read." * TimedOutException -- "The node responsible for the write or read did not respond during the rpc interva

Re: Handling failures in Thrift

2010-05-13 Thread Ian Soboroff
I suspect the issue in my case is saturation, or that the node has gone down. In the case of saturation, sleeping and retrying seems to be the fix. Otherwise setup a new transport/proto/client to a new host in the cluster. Ok, got it. Ian On Thu, May 13, 2010 at 2:20 PM, Roger Schildmeijer wrot

Re: Cassandra data model for financial data

2010-05-13 Thread Steve Lihn
I am not sure this is a good design in Cassandra. What if I just want to get all the data points for AAPL? Since AAPL is not a key, how does Cassandra get the data if I don't provide the years? On Thu, Apr 29, 2010 at 1:09 AM, Schubert Zhang wrote: > key : stock ID, e.g. AAPL+year > column fam

Re: Cassandra data model for financial data

2010-05-13 Thread Miguel Verde
I also think that's not a good design, but only because the typical query would have to hit several column families instead of just one. To answer your question, use a http://wiki.apache.org/cassandra/API#KeyRange which includes AAPL across all years you might want in your http://wiki.apache.org/c

Re: how does cassandra compare with mongodb?

2010-05-13 Thread Steve Lihn
What is changing? A more flexible schema or no need to restart (some kind of hot-reboot)? Mongo guys claims that Mongo's advantage is a schema-less design. Basically you can have any data structure you want and you can change them anyway you want. This is done in the name of "flexibility", but I a

Re: how does cassandra compare with mongodb?

2010-05-13 Thread Gary Dusbabek
Cassandra has always enforced the tiniest bit of schema. You basically define how you want your columns and subcolumns to be sorted within column families. You also name the column families and keyspaces. That's all though. The part that is changing is that the keyspaces and column families wil

Re: how does cassandra compare with mongodb?

2010-05-13 Thread Benjamin Black
Mongo has a rich query API and a weak distribution/replication story. Cassandra has a narrow (read: weak) query API and a strong distribution/replication story. If you want really shallow learning curve, easy querying, etc, won't have that much data, and are handy with the typical master/slave rep

Re: Cassandra data model for financial data

2010-05-13 Thread Benjamin Black
On Thu, May 13, 2010 at 12:45 PM, Miguel Verde wrote: > I also think that's not a good design, but only because the typical query > would have to hit several column families instead of just one. > This is completely normal in a columnar store. You query at least one index CF, then use the respon

Locking and transactions over Cassandra operations using "Cages"

2010-05-13 Thread Dominic Williams
A system called "Cages" has just been released. Where needed, you can use Cages to apply locking and soon transactions over sequences of Cassandra operations. There is a post explaining how Cages can be used with Cassandra here: http://ria101.wordpress.com/2010/05/12/locking-and-transactions-over

Increment and Decrement operation

2010-05-13 Thread Beier Cai
Is it possible to increment/decrement a column value directly without reading it first and then do the operation on client side? In mysql you can do "UPDATE mytable SET counter=counter+1", any equivalent in Cassandra? Beier, Cai beier...@gmail.com

batch mutate + deletion + slice range predicate unsupported

2010-05-13 Thread B. Todd Burruss
i just figured out that can't do a batch mutate + deletion that uses a slice range predicate. is adding this functionality targeted for a particular release? what i am trying to do is delete the first X columns in a row. i can get around it by requesting all the columns in question and then

Re: batch mutate + deletion + slice range predicate unsupported

2010-05-13 Thread Gary Dusbabek
Yes--0.7. I aim to make it part of https://issues.apache.org/jira/browse/CASSANDRA-494 (remove_slice). Gary. On Thu, May 13, 2010 at 16:08, B. Todd Burruss wrote: > i just figured out that can't do a batch mutate + deletion that uses a slice > range predicate.  is adding this functionality targ

Re: Cassandra data model for financial data

2010-05-13 Thread Miguel Verde
I agree that it's more normal in a columnar store than in an RDBMS, but in my experience modelling similar data, the vast majority of the time I want all of {high, low, close, volume} and optimizing for that would be my goal. It does seem like Steve has more expansive attributes to track (e.g. shar

Re: Increment and Decrement operation

2010-05-13 Thread Tobias Jungen
I don't think this is currently possible. There is some work underway to add it in the future, however: https://issues.apache.org/jira/browse/CASSANDRA-721 https://issues.apache.org/jira/browse/CASSANDRA-1016 On Thu, May 13, 2010 at 4:04 PM, Beier Cai wrote: > Is it possible to increment/decrem

Re: Increment and Decrement operation

2010-05-13 Thread Paul Prescod
No, but there is ongoing work on it: * https://issues.apache.org/jira/browse/CASSANDRA-580 * http://www.formspring.me/joestump/q/420668558 * http://permalink.gmane.org/gmane.comp.db.cassandra.user/3740 And in the meantime, an interim patch: * https://issues.apache.org/jira/browse/CASSANDRA

Re: batch mutate + deletion + slice range predicate unsupported

2010-05-13 Thread B. Todd Burruss
thx On 05/13/2010 02:12 PM, Gary Dusbabek wrote: Yes--0.7. I aim to make it part of https://issues.apache.org/jira/browse/CASSANDRA-494 (remove_slice). Gary. On Thu, May 13, 2010 at 16:08, B. Todd Burruss wrote: i just figured out that can't do a batch mutate + deletion that uses a slic

Re: Increment and Decrement operation

2010-05-13 Thread Beier Cai
Thanks for the info, hopefully it will make it to the next version Beier, Cai beier...@gmail.com On Thu, May 13, 2010 at 2:28 PM, Paul Prescod wrote: > No, but there is ongoing work on it: > > * https://issues.apache.org/jira/browse/CASSANDRA-580 > > * http://www.formspring.me/joestump/q/420

Re: Increment and Decrement operation

2010-05-13 Thread Paul Prescod
I'm curious what the relevance of CASSANDRA-1016 is. On Thu, May 13, 2010 at 2:24 PM, Tobias Jungen wrote: > I don't think this is currently possible. There is some work underway to add > it in the future, however: > > https://issues.apache.org/jira/browse/CASSANDRA-721 > https://issues.apache.or

Re: Cassandra data model for financial data

2010-05-13 Thread Steve Lihn
For what I have to handle, yes, there are a lot of attributes (daily) in addition to the daily prices (OHLC). At securities level, SharesOutstanding, TradedVolume, ShortInterest. At the company level, even more - MarketCap, DilutedSharesOutstanding, P/E, P/B, DividendYield, etc, etc.. Seems like ea

Re: list of columns

2010-05-13 Thread Bill de hOra
A SlicePredicate/SliceRange can't exclude column values afaik. Bill Jonathan Shook wrote: get_slice see: http://wiki.apache.org/cassandra/API under get_slice and SlicePredicate On Thu, May 13, 2010 at 9:45 AM, Bill de hOra wrote: get_count returns the number of columns, not the names of tho

Re: how does cassandra compare with mongodb?

2010-05-13 Thread philip andrew
MongoDB encourages you to define your schema in your application code by using mapping classes. This logically infers that it makes no sense to define the schema twice, in the database and in your application code. On Fri, May 14, 2010 at 3:48 AM, Steve Lihn wrote: > What is changing? A more fle

auto-purge on key

2010-05-13 Thread Sagar Naik
Hi Is there any auto-purging of keys mechanism (or time to live on key )in cassandra. Something, like after so many days, the key and its associated column will be removed -Sagar

Re: auto-purge on key

2010-05-13 Thread Keith Thornhill
check out https://issues.apache.org/jira/browse/CASSANDRA-699 -keith On Thu, May 13, 2010 at 6:46 PM, Sagar Naik wrote: > Hi > Is there any auto-purging of keys mechanism (or time to live on key )in > cassandra. > Something, like after so many days, the key and its associated column will be >

Re: how does cassandra compare with mongodb?

2010-05-13 Thread Steve Lihn
Not sure how to comment on this concept. I guess it infers that the database and application are no longer loosely coupled, but now strongly coupled. I guess too, that java developers will vote yes, while database architect and DBA will vote no. In the "traditional" sense, enterprise data is the s

Re: Increment and Decrement operation

2010-05-13 Thread gabriele renzi
On Fri, May 14, 2010 at 12:43 AM, Paul Prescod wrote: > I'm curious what the relevance of CASSANDRA-1016 is. I guess if you had "operations" moved to the data you could implement incr/decr easily: read the previous value, add one, write the new value. This does not yet seem what 1016 is for thoug