Migrating an Apache Table to MongoDB: Setting Up the Environment

We need to install the following software for this chapter:

  • Apache Cassandra 2.2.0 apache-cassandra-2.2.0-bin.tar.gz from http://cassandra.apache.org/download/. Extract tar.gz file to a directory and add the bin directory, for example, the C:\apache-cassandra-2.2.0\bin directory to the PATH variable.
  • MongoDB 3.0.5 from www.mongodb.org/downloads.
  • Eclipse IDE for Java EE Developers from www.eclipse.org/downloads/.
  • Java 7 from www.oracle.com/technetwork/java/javase/downloads/jdk7- downloads-1880260.html.

Double-click on the MongoDB binary distribution to install MongoDB. Add the bin directory (C:\Program Files\MongoDB\Server\3.0\bin) of the MongoDB installation to the PATH environment. Create a directory C:\data\db for the MongoDB data if not already created for an earlier chapter.

Start Apache Cassandra server with the following command.

>cassandra -f

The server gets started as shown in the server output in Figure 6-1. If the thrift service does not get started, run the command nodetool enablethrift. The Cassandra server is listening for clients on localhost on port 9160.

Start the MongoDB server with the following command.

>mongod

The MongoDB server gets started as shown in Figure 6-2. The MongoDB is waiting for connections on localhost on port 27017.

Source: Vohra Deepak (2015), Pro MongoDB™ Development, Apress; 1st ed. edition.

Leave a Reply

Your email address will not be published. Required fields are marked *