Question

I am new to cassandra and getting confusion between cassandra server and cqlsh.

When I execute a cassandra.bat file in cmd, it is giving "Listening for thrift clients...", what are these thrift clients?

If it is possible to execute queries using cqlsh, then what is the need of starting cassandra server?

Please help me in understanding?

Was it helpful?

Solution

Lets try to bring some clarification:

  • cassandra.bat: is the command used to start a cassandra server. Once a cassandra server (node) is running it can listen to "local" or "remote" calls from cassandra clients (depending on your configuration, you can allow or not remote calls). Basically this sets up cassandra server and can perform different operations on its databases based on received queries. So, if you are developing a cassandra database and want to use it, you need to run this command on the node that has that database. Thrift is a communication protocol used by Cassandra and other applications to handle data (e.g.: on remote procedure calls).

  • cqlsh: is a CQL client of cassandra (cassandra-cli is another one). You use it to "talk" with a "cassandra server" (which you start with cassandra.bat). With cqlsh you can execute different CQL queries - to create, delete or update databases. You do not need to have a cassandra node running on your computer to use cqlsh to query a "remote" cassandra server (you can call a remote cassandra server using: cqlsh --cql3 <IP-remote-node> <port-remote-node>).

HTH.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top