Hi,

If reading latency is tolerable, you can get 700 columns every time, set end
key of last iteration as start key of next iteration, to retrieve all the
data.

Or you can implement a plugin of cassandra to do column filter, only returns
the data you want.
The computation is done locally in cassandra machine, and will be quite fast
to avoid timeoutexception.

2010/8/19 Jone Lura <jone.l...@ecc.no>

> Hi,
>
> We are trying to implement Cassandra to replace one of our biggest SQL
> tables, and so far we got it working.
>
> However, for testing I'm using Cassandra 0.6.2, Java and Pelops. (Pelops
> not that important for my question) and need suggestions on how to solve a
> problem retrieving a key range based on the following.
>
> <Keyspace Name="AIS">
>         <ColumnFamily Name="Location"
>         ColumnType="Super"
>         CompareWith="LongType"
>         KeysCached="100%"
>         CompareSubcolumnsWith="UTF8Type" />
>      ...
>     </Keyspace>
>
> The super column got columns for longitude and latitude.
>
>  1. Need to get get max long number for key
>  2. The key should also have supercolumns latitude and longitude column
> intersecting (inside) with a given boundingbox.
>
> Currently I'm doing like this
>
>
>         KeyRange keyRange = new KeyRange();
>         keyRange.setStart_key("");
>         keyRange.setEnd_key("");
>         keyRange.setCount(700);
>
> And checking every row in db if it match my bounding box.
>
> But there are a lot more than 700 keys.. and if i set a higher count, the
> get_range_slice get a Timeout Exception.
>
> Any ideas?
>
> Best Regards
> Jone
>



-- 
Best Regards,
Chen Xinli

Reply via email to