cassandra-client-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pushkar Prasad" <>
Subject Unable to prefix in astyanax read query
Date Tue, 02 Apr 2013 14:11:00 GMT

This is a Astyanax issue that we've encountered.

I have a scheme as follows:

 Device ID
 Device Name
 Device Owner
 Device location

I have created this column family using CQL and defined the primary key as 
(TimeStamp,Device ID, Device Name). Through a serializable object that has 
fields for DeviceID, name and a field name (which stores either Device Owner
Device Location). I have inserted some records using Astyanax.

As per my understanding, the columns for a row are created by combining
Device ID, Device Name and field name as column name and the value to be the
value for that particular field. Thus for a particular timestamp and device,
the column names would be in the pattern (Device ID:Device Name: ...).

So I believe we can use these 2 fields as prefix to obtain all the entries
for a particular time-device combination.

I am using the following query to obtain the results:

  RowSliceQuery<String, ApBaseData> query = adu.keyspace
  .withColumnRange(new RangeBuilder()

But on executing the above query I get the following Exception:

BadRequestException: [host=localhost(, latency=6(6), 
attempts=1]InvalidRequestException(why:Not enough bytes to read value of 
component 0)

Can any one help to understand where am I going wrong?

View raw message