java thrift error

2011-12-20 Thread A J
The following syntax : import org.apache.cassandra.thrift.*; . . ColumnOrSuperColumn col = client.get("count_key".getBytes("UTF-8"), cp, ConsistencyLevel.QUORUM); is giving the error: get(java.nio.ByteBuffer,org.apache.cassandra.thrift.ColumnPath,org.apache.cassandra.thrift.ConsistencyLev

Re: java thrift error

2011-12-20 Thread Dave Brosius
A ByteBuffer is not a byte[] to convert a String to a ByteBuffer do something likepublic static ByteBuffer toByteBuffer(String value) throws UnsupportedEncodingException { return ByteBuffer.wrap(value.getBytes("UTF-8")); } see http://wiki.apache.org/cassandra/ThriftExamples --

Re: java thrift error

2011-12-20 Thread A J
Message -* > *From:* "A J" > *Sent:* Tue, December 20, 2011 15:52 > *Subject:* java thrift error > > The following syntax : > import org.apache.cassandra.thrift.*; > . > . > ColumnOrSuperColumn col = client.get("count_key".getByt