To begin with, we will create a cluster object, connect to Cassandra and execute a simple query. We will also fetch cluster metadata. I would recommend using the single-node cluster we launched in Chapter 1, Getting Up and Running with Cassandra, rather than the 3-node cluster from the previous chapter. This is because the single-node cluster has all the tables and data required for this chapter. Before we begin, you should familiarize yourselves with any of the free IDEs available to edit, compile, and run Java code.
To compile and run Java programs from the command line, you can look at this article: http://introcs.cs.princeton.edu/java/15inout/linux-cmd.html.
There are multiple IDEs available, which make it easier to compile and run programs. Some of them are as follows:
- Netbeans: https://netbeans.org/
- Eclipse: https://eclipse.org/
- IntelliJ IDEA: https://www.jetbrains.com/idea/features/