incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam D <technologyl...@gmail.com>
Subject Sample Client Code
Date Thu, 09 Apr 2009 21:02:10 GMT
Hi,

I am new to Cassandra, just installed the latest version on my machine.  I
am able to insert rows using the web (@7002), but I am not able to get a
java client to insert rows into a table. Below the piece of code I am using,
the insert call goes through fine without any exceptions, but I am not able
to see the row in the table, so I assume its not being inserted properly.

        socket = new TSocket(machine,port);
        TProtocol tp = new TBinaryProtocol(socket);
        cl = new Cassandra.Client(tp);
        socket.open();
        cl.insert("xmls", "x1", "content:xml", "xyz", 0);

Can you please point me to any sample code available which I can refer to ?.

Thanks
Sam.

Mime
View raw message