rangeQuery to traverse keys backward?

2013-01-31 Thread Yuhan Zhang
Hi all, I'm tryinng to use get_range to traverse the rows by page by providing a :start_key and an :finish_key. This works fine when I traverse forward with :start_key=>last_key, :finish_key=>"" However, when I tried to traversed backward with :start_key="", :finish_key=>first_key, this always ga

how to detect stream closed in twitter/cassandra api?

2012-11-02 Thread Yuhan Zhang
Hi all, I'm using twitter/cassandra ruby client, trying to pool a connection in a static variable. @@client = Cassandra.new(keyspace, host, :retries => retries, :connect_timeout => connect_timeout, :timeout => timeout, :exception_classes => []) but the connection returns "stream closed error"

Re: how to enter float value from cassandra-cli ?

2012-09-12 Thread Yuhan Zhang
owse/CASSANDRA > ? > > You could try cqlsh http://www.datastax.com/docs/1.1/dml/using_cql > > Cheers > > - > Aaron Morton > Freelance Developer > @aaronmorton > http://www.thelastpickle.com > > On 12/09/2012, at 11:29 AM, Yuhan Zhang wrote: >

how to enter float value from cassandra-cli ?

2012-09-11 Thread Yuhan Zhang
Hi all, I'm trying to manually adding some double values into a column family. From the Hector client, there's a DoubleSerializer. but looks like the cli tool is not providing a way to enter floating point values. here's the message I got: [default@video] set cateogry['1']['sport'] = float('0.5')

Re: cassandra twitter ruby client

2012-08-27 Thread Yuhan Zhang
[value].pack('G') > @client.insert(:somecf, 'key', {'floatval' => [value].pack('G')}) > > and to read it back out: > > value = @client.get(:somecf, 'key', ['floatval']).unpack('G')[0] > > Note that the cas

cassandra twitter ruby client

2012-08-27 Thread Yuhan Zhang
Hi all, I'm playing with cassandra's ruby client written by twitter, trying to perform a simple get. but looks like it assumed the value types to be uft8 string. however, my values are in double (keyed and column names are utf8types). The values that I got are like: {"Top":"?\ufffd\ufffd\ufffd\u

Re: cassandra secondary index with

2012-06-19 Thread Yuhan Zhang
Hi Jonathan, thanks for the reference. will read up on it. Yuhan

Re: release of cassandra-unit 1.1.0.1

2012-06-19 Thread Yuhan Zhang
examples : > https://github.com/jsevellec/cassandra-unit-examples > > This can perhaps help... > > Regards, > > -- > Jérémy > -- Yuhan Zhang Application Developer OneScreen Inc. yzh...@onescreen.com www.onescreen.com The information contained in this e-mail is for the

Re: cassandra secondary index with

2012-06-19 Thread Yuhan Zhang
, Jun 19, 2012 at 12:23 PM, Yuhan Zhang wrote: > Hi all, > > I'm trying to search by the secondary index of cassandra with "greater > than or equal". but reached an exception stating: > me.prettyprint.hector.api.exceptions.HInvalidRequestException: > InvalidReq

cassandra secondary index with

2012-06-19 Thread Yuhan Zhang
ression(columnName, value);// this works! QueryResult> result = indexedSlicesQuery.execute(); return result; } Is there any column_meta setting that is required in order to make GTE comparison works on secondary index? Thank you. Yuhan Zhang

Re: how do remove default_validation_class using cassandra-cli?

2012-05-15 Thread Yuhan Zhang
to answer my own question: set default_validation_class = BytesType; On Tue, May 15, 2012 at 7:09 PM, Yuhan Zhang wrote: > Hi all, > > Is there a way to remove default_validation_class after assigned it to a > column family? > > I'd like to have a column family stori

how do remove default_validation_class using cassandra-cli?

2012-05-15 Thread Yuhan Zhang
Hi all, Is there a way to remove default_validation_class after assigned it to a column family? I'd like to have a column family storing both string and long. looks like it throws error at me for "String didn't validate". Thank you. Yuhan

Re: timed-out retrieving a giant row.

2012-02-14 Thread Yuhan Zhang
something >> like this: >> >> Query you CF with a range.setStart(lastColName) and >> range.setFinish(StringUtils.byte("") where the " lastColName " is the name >> of the column from the previous read. >> >> You can continue this until you run

timed-out retrieving a giant row.

2012-02-14 Thread Yuhan Zhang
Hi all, I'm using the Hector client 0.8, trying to retrieve a list of IDs from a gaint row. each ID is a columnName in the row It works ok when there's not many IDs, but SliceQuery starts to time-out after the row becomes big. Is this approach the correct way to store a list of IDs? are there som

Re: TimedOutException and UnavailableException from multiGetSliceQuery

2011-10-05 Thread Yuhan Zhang
ronmorton > http://www.thelastpickle.com > > On 6/10/2011, at 9:14 AM, Yuhan Zhang wrote: > > Hi all, > > I have been experiencing the unavailableException and TimedOutException on > a 3-node cassandra cluster > during a multiGetSliceQuery with 1000 columns. Since there

TimedOutException and UnavailableException from multiGetSliceQuery

2011-10-05 Thread Yuhan Zhang
Hi all, I have been experiencing the unavailableException and TimedOutException on a 3-node cassandra cluster during a multiGetSliceQuery with 1000 columns. Since there are many keys involved in the query, I divided them into groups of 5000 rows and process each group individually in a for loop. b