strauberry
unread,Jun 18, 2011, 9:14:44 AM6/18/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hector-users
Hi everybody,
I'd like to get all rows from a column family and display all columns
as well. I tried this one:
CqlQuery<String, String, String> cqlQuery =
new CqlQuery<String, String, String>(fKeyspace, fStringS,
fStringS, fStringS);
cqlQuery.setQuery("SELECT * FROM ColumnFamily");
QueryResult<CqlRows<String, String, String>> result =
cqlQuery.execute();
CqlRows<String, String, String> rows = result.get();
for (Row<String, String, String> row : rows.getList()) {
System.out.println(row.getKey() + ":");
for(HColumn<String, Object>col :
row.getColumnSlice().getColumns()) {
System.out.println(col.getName() + " : " + col.getValue());
}
}
}
The problem is, that all the columns which have long-values for
example are empty. If I change the last "parameterizer" to Object, I
get a "CorruptedStreamException". How do I have to do this?
Thank you very much!
Best
Christian