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
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 --
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