incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Олександр Силка <sylkaa...@gmail.com>
Subject Problem with UUID
Date Fri, 08 Apr 2011 19:52:25 GMT
Hi everyone,

I have column family called site sorted
by org.apache.cassandra.db.marshal.TimeUUIDType.
When I try to save some data using hector i get next
message InvalidRequestException(why:TimeUUID should be 16 or 0 bytes (3)).
My Cassandra version 0.7.0

This is snippets of my code:

public static java.util.UUID getTimeUUID() {
return java.util.UUID.fromString(new com.eaio.uuid.UUID().toString());
}

UUID timeUUID = getTimeUUID().randomUUID();
List<HColumn<String, String>> columns = DaoHelper.getStringCols(site);

 Mutator<UUID> mutator = HFactory.createMutator(keyspace,
UUIDSerializer.get());
 for (HColumn<?, ?> column : columns) {
          mutator.addInsertion(timeUUID, columnFamilyName, column);
 }

I am new in Cassandra and i really want to understand how it works.So please
help me.

Mime
View raw message