Database Reference
In-Depth Information
Introduction to CLI
This section gets you acquainted with another tool that is used for interaction with Cas-
sandra 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: 0
Compaction min/max thresholds: 4/32
Read repair chance: 0.1
DC Local Read repair chance: 0.0
Replicate on write: true
Caching: KEYS_ONLY
Bloom Filter FP chance: default
Built indexes: []
Search WWH ::




Custom Search