On 2013-07-09 11:46, Shubham Mittal wrote:
yeah I tried that and below is the output I get

LOG: resolving remote host localhost:9160


libcql is an implementation for the "new binary transport protocol": https://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=blob_plain;f=doc/native_protocol.spec;hb=refs/heads/cassandra-1.2

It is not a thrift transport.

By default it uses the 9042 port. You'll have to activate it on the server. Write (or uncomment) "start_native_transport: true" in conf/cassandra.yaml.

According to the posted log, you connect to the thrift transport port, 9160. As you send a frame of the new transport protocol to the old thrift protocol, the server does not understand it and closes your connection.

Regards,
Sorin


LOG: resolved remote host, attempting to connect
LOG: connection successful to remote host
LOG: sending message: 0x0100000500000000 {version: 0x01, flags: 0x00,
stream: 0x00, opcode: 0x05, length: 0} OPTIONS
LOG: wrote to socket 8 bytes
LOG: error reading header End of file

and I checked all the keyspaces in my cluster, it changes nothing in the
cluster.

I couldn't understand the code much. What is this code supposed to do
anyways?


On Tue, Jul 9, 2013 at 4:20 AM, aaron morton <aa...@thelastpickle.com
<mailto:aa...@thelastpickle.com>> wrote:

    Did you see the demo app ?
    Seems to have a few examples of reading data.

    https://github.com/mstump/libcql/blob/master/demo/main.cpp#L85

    Cheers

    -----------------
    Aaron Morton
    Freelance Cassandra Consultant
    New Zealand

    @aaronmorton
    http://www.thelastpickle.com

    On 9/07/2013, at 1:14 AM, Shubham Mittal <smsmitta...@gmail.com
    <mailto:smsmitta...@gmail.com>> wrote:

    Hi,

    I found out that there exist a C++ client libcql for cassandra but
    its github repository just provides the example on how to connect
    to cassandra. Is there anyone who has written some code
    using libcql to read and write data to a cassandra DB, kindly
    share it.

    Thanks



Reply via email to