Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [edward@tablitha apache-cassandra-1.2.0-beta1]$ bin/cqlsh -3
- Connected to Test Cluster at localhost:9160.
- [cqlsh 2.2.0 | Cassandra 1.2.0-beta1 | CQL spec 3.0.0 | Thrift protocol 19.34.0]
- Use HELP for help.
- cqlsh> use videos;
- cqlsh:videos> SELECT * FROM videos WHERE videoname = 'My funny cat';
- videoid | videoname | description | tags | upload_date | username
- --------------------------------------+--------------+-------------------------------------------+----------------+--------------------------+----------
- 99051fe9-6a9c-46c2-b949-38ef78858dd0 | My funny cat | My cat likes to play the piano! So funny. | cats,piano,lol | 2012-06-01 08:00:00+0000 | ctodd
- cqlsh:videos> exit;
- [edward@tablitha apache-cassandra-1.2.0-beta1]$ bin/cassandra-cli
- Connected to: "Test Cluster" on 127.0.0.1/9160
- Welcome to Cassandra CLI version 1.2.0-beta1
- Type 'help;' or '?' for help.
- Type 'quit;' or 'exit;' to quit.
- [default@unknown] use videos;
- Authenticated to keyspace: videos
- [default@videos] list videos;
- videos not found in current keyspace.
- [default@videos] show schema;
- create keyspace videos
- with placement_strategy = 'NetworkTopologyStrategy'
- and strategy_options = {datacenter1 : 1}
- and durable_writes = true;
- use videos;
- cqlsh> use videos;
- cqlsh:videos> show schema;
- Improper show command.
- cqlsh:videos> describe schema;
- CREATE KEYSPACE abc WITH strategy_class = 'NetworkTopologyStrategy'
- AND strategy_options:datacenter1 = '1';
- CREATE KEYSPACE system WITH strategy_class = 'LocalStrategy';
- USE system;
- CREATE TABLE hints (
- target_id uuid PRIMARY KEY
- ) WITH
- comment='hints awaiting delivery' AND
- comparator='org.apache.cassandra.db.marshal.CompositeType'<timeuuid, int> AND
- read_repair_chance=0.000000 AND
- gc_grace_seconds=0 AND
- default_validation=blob AND
- replicate_on_write='true' AND
- compaction_strategy_class='SizeTieredCompactionStrategy' AND
- compaction_strategy_options:min_threshold='0' AND
- compaction_strategy_options:max_threshold='0' AND
- compression_parameters:sstable_compression='SnappyCompressor';
- CREATE TABLE "Schema" (
- KEY blob PRIMARY KEY
- ) WITH
- comment='unused' AND
- comparator=text AND
- read_repair_chance=0.000000 AND
- gc_grace_seconds=0 AND
- default_validation=blob AND
- replicate_on_write='true' AND
- compaction_strategy_class='SizeTieredCompactionStrategy';
- CREATE TABLE schema_keyspaces (
- keyspace_name text PRIMARY KEY,
- strategy_options text,
- durable_writes boolean,
- strategy_class text
- ) WITH
- comment='keyspace definitions' AND
- comparator=text AND
- read_repair_chance=0.000000 AND
- gc_grace_seconds=8640 AND
- default_validation=text AND
- replicate_on_write='true' AND
- compaction_strategy_class='SizeTieredCompactionStrategy' AND
- compression_parameters:sstable_compression='SnappyCompressor';
- CREATE TABLE "HintsColumnFamily" (
- KEY blob PRIMARY KEY
- ) WITH
- comment='unused' AND
- comparator=blob AND
- read_repair_chance=0.000000 AND
- gc_grace_seconds=0 AND
- default_validation=blob AND
- replicate_on_write='true' AND
- compaction_strategy_class='SizeTieredCompactionStrategy';
- CREATE TABLE "NodeIdInfo" (
- "key" text PRIMARY KEY
- ) WITH
- comment='counter node IDs' AND
- comparator=timeuuid AND
- read_repair_chance=0.000000 AND
- gc_grace_seconds=0 AND
- default_validation=text AND
- replicate_on_write='true' AND
- compaction_strategy_class='SizeTieredCompactionStrategy' AND
- compression_parameters:sstable_compression='SnappyCompressor';
- CREATE TABLE "IndexInfo" (
- table_name text PRIMARY KEY
- ) WITH
- comment='indexes that have been completed' AND
- comparator=text AND
- read_repair_chance=0.000000 AND
- gc_grace_seconds=0 AND
- default_validation=text AND
- replicate_on_write='true' AND
- compaction_strategy_class='SizeTieredCompactionStrategy' AND
- compression_parameters:sstable_compression='SnappyCompressor';
- CREATE TABLE "Migrations" (
- KEY blob PRIMARY KEY
- ) WITH
- comment='unused' AND
- comparator=timeuuid AND
- read_repair_chance=0.000000 AND
- gc_grace_seconds=0 AND
- default_validation=blob AND
- replicate_on_write='true' AND
- compaction_strategy_class='SizeTieredCompactionStrategy';
- CREATE TABLE "LocationInfo" (
- KEY blob PRIMARY KEY
- ) WITH
- comment='unused' AND
- comparator=blob AND
- read_repair_chance=0.000000 AND
- gc_grace_seconds=0 AND
- default_validation=blob AND
- replicate_on_write='true' AND
- compaction_strategy_class='SizeTieredCompactionStrategy';
- CREATE KEYSPACE testks WITH strategy_class = 'NetworkTopologyStrategy'
- AND strategy_options:datacenter1 = '1';
- USE testks;
- CREATE KEYSPACE videos WITH strategy_class = 'NetworkTopologyStrategy'
- AND strategy_options:datacenter1 = '1';
- CREATE KEYSPACE system_traces WITH strategy_class = 'SimpleStrategy'
- AND strategy_options:replication_factor = '1';
- cqlsh:videos>
- cqlsh:videos> describe table videos;
- CREATE TABLE videos (
- videoid uuid,
- videoname text,
- description text,
- tags text,
- upload_date timestamp,
- username text,
- PRIMARY KEY (videoid, videoname)
- ) WITH
- comment='' AND
- caching='KEYS_ONLY' AND
- read_repair_chance=0.100000 AND
- gc_grace_seconds=864000 AND
- replicate_on_write='true' AND
- compaction_strategy_class='SizeTieredCompactionStrategy' AND
- compression_parameters:sstable_compression='SnappyCompressor';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement