Book Image

Real-time Analytics with Storm and Cassandra

By : Shilpi Saxena
Book Image

Real-time Analytics with Storm and Cassandra

By: Shilpi Saxena

Overview of this book

Table of Contents (19 chapters)
Real-time Analytics with Storm and Cassandra
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction to CLI


This section gets you acquainted with another tool that is used for interaction with Cassandra processes—the CLI shell.

The following steps are used for interacting with Cassandra using the CLI shell:

  1. The following is the command to connect to the Cassandra CLI:

    Cd Cassandra-installation-dir/bin
    cassandra-cli -host localhost -port 9160
    
  2. Create a keyspace:

    [default@unknown] CREATE KEYSPACE myKeySpace
    with placement_strategy = 'SimpleStrategy'
    and strategy_options = {replication_factor:1};
    
  3. Verify the creation of the keyspace using the following command:

    [default@unknown] SHOW KEYSPACES;
      Durable Writes: true
        Options: [replication_factor:3]
      Column Families:
        ColumnFamily: MyEntries
          Key Validation Class:  org.apache.cassandra.db.marshal.UTF8Type
          Default column value validator:  org.apache.cassandra.db.marshal.UTF8Type
          Columns sorted by:  org.apache.cassandra.db.marshal.ReversedType (org.apache.cassandra.db.marshal.TimeUUIDType)
          GC grace seconds...