SHOW

Shows the Apache Cassandra version, host, or tracing information for the current cqlsh client session.

Shows the Cassandra version, host, or tracing information for the current cqlsh client session.

Synopsis 

SHOW VERSION
| HOST
| SESSION tracing_session_id
Legend
  • Uppercase means literal
  • Lowercase means not literal
  • Italics mean optional
  • The pipe (|) symbol means OR or AND/OR
  • Ellipsis (...) means repeatable

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 native protocol version used by the connected Cassandra instance.
  • The host information of the Cassandra node that the cqlsh session is currently connected to.
  • Tracing information for the current cqlsh session.

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.

cqlsh:my_ks> SHOW version
[cqlsh 5.0.1 | Cassandra 2.1.0 | CQL spec 3.2 | Native protocol v3]

cqlsh:my_ks> SHOW host
Connected to Test Cluster at 127.0.0.1:9042.
      
cqlsh:my_ks> 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
. . .