If you don't know the names of the columns you probably want to call ColumnSlice.getColumns()
and iterate through the list of HColumns.
see
http://rantav.github.com/hector//source/content/API/core/1.0-1/me/prettyprint/hector/api/beans/ColumnSlice.html
http://rantav.github.com/hector//source/content/API/core/1.0-1/me/prettyprint/hector/api/beans/HColumn.html
Hope that helps.
-----------------
Aaron Morton
Freelance Developer
@aaronmorton
http://www.thelastpickle.com
On 20/12/2011, at 5:58 AM, Martin Arrowsmith wrote:
> 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 simple queries using
"SliceQuery."
>
> My following questions relate to the 3rd block of code from that site.
>
> So far, in addition to the 3rd block of code, I have:
>
> QueryResult<ColumnSlice<Composite, String>> queryResult = sq.execute();
> ColumnSlice<Composite, String> c = queryResult.get();
> System.out.println(c);
>
> Could someone describe how I can extract the "column_name" from my query search ? And
how I can extract just the value of that composite column ?
>
> Best wishes,
>
> Martin
>
|