Skip to content

default validator comparator type on hector clients: "cannot parse 'SomeColumn' as hex bytes" #674

Open
@krishna81m

Description

I am testing if we can upgrade our cassandra 1.2.13 to 1.2.19 and spun up a single instance and populated data from 1.2 without any problem, everything works, even from a IDE client on thrift:9160 port is able to run this query.

However, hector throws an exception, although we do read by passing key, value, name serializer as string, but shouldn't there be a way to specify the default validator, comparator also as UTF8?
CqlQuery<String, String, String> cqlQuery = new CqlQuery<String, String, String>(instance.getMasterKeyspace(),STR_SERIALIZER,STR_SERIALIZER,STR_SERIALIZER);

The fix was to explicitly create the tables
WITH COMPACT STORAGE

to get the default validator, comparator types to UTF8Type.
http://www.planetcassandra.org/blog/datastax-developer-blog-a-thrift-to-cql3-upgrade-guide/

Caused by: InvalidRequestException(why:cannot parse 'SomeColumn' as hex bytes)
    at org.apache.cassandra.thrift.Cassandra$execute_cql_query_result.read(Cassandra.java:36625)
    at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
    at org.apache.cassandra.thrift.Cassandra$Client.recv_execute_cql_query(Cassandra.java:1525)
    at org.apache.cassandra.thrift.Cassandra$Client.execute_cql_query(Cassandra.java:1511)
    at me.prettyprint.cassandra.model.CqlQuery$1.execute(CqlQuery.java:118)
    ... 88 more

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions