CQL for Cassandra 2.0

SHOW

Shows the Cassandra version, host, or data type assumptions for the current cqlsh client session.

Synopsis

SHOW VERSION
| HOST
| ASSUMPTIONS
| SESSION ( tracing session id )

Synopsis Legend

  • Uppercase means literal
  • Lowercase means not literal
  • Italics mean optional
  • The pipe (|) symbol means OR or AND/OR
  • Ellipsis (...) means repeatable
  • Orange ( and ) means not literal, indicates scope

A semicolon that terminates CQL statements is not included in the synopsis.

Description

A SHOW command displays this information about the current cqlsh client session:

  • The version and build number of the connected Cassandra instance, as well as the CQL mode for cqlsh and the Thrift protocol used by the connected Cassandra instance.
  • The host information of the Cassandra node that the cqlsh session is currently connected to.
  • The data type assumptions for the current cqlsh session as specified by the ASSUME command.

The SHOW SESSION command retrieves tracing session information, which is available for 24 hours. After that time, the tracing information time-to-live expires.

These examples show how to use the commands.

SHOW VERSION;

SHOW HOST;

SHOW ASSUMPTIONS;
      
SHOW SESSION d0321c90-508e-11e3-8c7b-73ded3cb6170;
      
Sample output of SHOW SESSION is:
Tracing session: d0321c90-508e-11e3-8c7b-73ded3cb6170

 activity                                                                                                                                | timestamp    | source    | source_elapsed
-----------------------------------------------------------------------------------------------------------------------------------------+--------------+-----------+----------------
                                                                                                                      execute_cql3_query | 12:19:52,372 | 127.0.0.1 |              0
 Parsing CREATE TABLE emp (\n  empID int,\n  deptID int,\n  first_name varchar,\n  last_name varchar,\n  PRIMARY KEY (empID, deptID)\n); | 12:19:52,372 | 127.0.0.1 |            153
                                                                                                                        Request complete | 12:19:52,372 | 127.0.0.1 |            650
. . .
      
Show/hide