Question

Cassandra CLI is being deprecated in Cassandra 3.0. Was wondering if its possible to get the storage engine representation of wide rows(dynamic columns), and not the relational view.

For example, executing the following in cassandra-cli would yield for key 'COEXEIGLE', with dynamic columns and counter values:

list table;

RowKey: COEXEIGLE
=> (counter=2014-04-07 18\:45\:00-0700:count, value=5)
=> (counter=2014-04-07 19\:30\:00-0700:count, value=1)
=> (counter=2014-04-07 19\:31\:00-0700:count, value=1)
=> (counter=2014-04-08 19\:31\:00-0700:count, value=2)

1 Row Returned.

Although, using cqlsh, the following sql statement, we you would get the traditional relational view of the data:

select * from table;

 serialId    | time                     | count
-------------+--------------------------+-------
   COEXEIGLE | 2014-04-07 18:45:00-0700 |     5
   COEXEIGLE | 2014-04-07 19:30:00-0700 |     1
   COEXEIGLE | 2014-04-07 19:31:00-0700 |     1
   COEXEIGLE | 2014-04-08 19:31:00-0700 |     2

(4 rows)

Again, curious if we could still see the storage engine representation and not the relational view.

Cassandra version:

[cqlsh 4.1.1 | Cassandra 2.0.6 | CQL spec 3.1.1 | Thrift protocol 19.39.0]
Was it helpful?

Solution

The Cassandra-Cli Actually doesn't show you an engine representation of the data (a large amount of information is not displayed). The only way to actually see how the data is laid out on disk is to use the sstable2json program. This will show the actually on disk representation of the data as the storage engine sees it.

My suggestion if you really need to see this view is to flush a table and the use sstable2json to transform it into a human readable format.

OTHER TIPS

Cassandra 3.0 will feature the revised storage engine from CASSANDRA-8099 ( https://issues.apache.org/jira/browse/CASSANDRA-8099 ), which essentially changes the storage itself to be cql-aware (cql rows/columns, rather than sstable partitions/columns), given that is how most modern users of Cassandra think about their data.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top