View RSS Feed

Recent Blogs Posts

  1. Making Cassandra Database Connection

    by , 02-23-2012 at 07:06 PM
    First thing to do is to create connection to database. For this purpose, on port 9160 open up a connection that would be a default port of Cassandra. Hand over it to the client of Cassandra and he will be taking care to communication to the server:
    Java Code: This is the code to explain Cassandra Database Connection
    import org.apache.thrift.protocol.TBinaryProtocol;
    import org.apache.thrift.protocol.TProtocol;
    import org.apache.thrift.transport.TSocket;
    import org.apache.thrift.transport.TTransport;
    import org.apache.cassandra.thrift.Cassandra;