1

I'm having some trouble getting a configuration script to match up with the columnfamily names I'm using. I feel like it would be a helpful debugging tool to be able to log all of the currently configured column families.

Is this possible? I've been looking around google groups and haven't found any mention of such a thing.

Slater Victoroff
  • 21,376
  • 21
  • 85
  • 144

2 Answers2

0

To display all of the keyspaces and their respective column families you can use nodetool cfstats

It will a very long list:

lyubent:bin lyubentodorov$ ./nodetool cfstats
Keyspace: system_traces                           <-------- KS
    Read Count: 0
    Read Latency: NaN ms.
    Write Count: 0
    Write Latency: NaN ms.
    Pending Tasks: 0
        Column Family: sessions                   <-------- CF
        SSTable count: 0
        Space used (live): 0
        Space used (total): 0
        ...

        Column Family: events                     <-------- CF
        SSTable count: 0
        Space used (live): 0
        Space used (total): 0
        Number of Keys (estimate): 0
        Memtable Columns Count: 0

 ...ETC....
Lyuben Todorov
  • 13,987
  • 5
  • 50
  • 69
0

@Slater Tyranus

For CQL3 tables

>echo "describe keyspace <your_keyspace_name>;" > command.cql
>cqlsh -3 -f command.cql > /tmp/schema.txt

For Thrift column families

>echo "describe keyspace <your_keyspace_name>;" > command.txt
>cassandra-cli -f command.txt > /tmp/schema.txt
doanduyhai
  • 8,712
  • 27
  • 26