A simple query

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 1Getting 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 ...

Get Learning Apache Cassandra - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.