I am working on updating old rule-based code in CQL3.
One part of the code goes through the entire data set of the table, consisting of 20M + rows. This part was originally due to memory usage due to memory usage, so I created a RowIterator class that was repeated through the column family using TokenRanges (and Hector).
When trying to rewrite this using CQL3, I had problems finding through data. I found some information at http://www.datastax.com/documentation/cql/3.0/cql/cql_using/paging_c.html , but when trying this code for the first "page"
resultSet = session.execute("select * from " + TABLE + " where token(key) <= token(" + offset + ")");
I get an error
com.datastax.driver.core.exceptions.InvalidTypeException: invalid type for value 0 of vargar type of CQL type, expecting class java.lang.String, but class java.lang.Integer is provided
Of course, the example uses numeric keys in the link. Is there a way to do this using varchar keys (UTF8Type)?
There seems to be built-in functionality for this ( https://issues.apache.org/jira/browse/CASSANDRA-4415 ), but I can not find examples that will make me go, In addition, I have to solve this for Cassandra 1.2 .nine.
java cassandra cql3
Moonwalkr
source share