Getting all keys using the Cassandra API - analogy to "SELECT id FROM table";

The Cassandra sstablekeys command-line sstablekeys can be used to extract all defined line keys from the physical SSTABLE file:

 sstablekeys .../cassandra/data/Keyspace1/Standard1-N-Data.db 

Does the Cassandra API support searching for all defined keys? If so, how?

I am looking for an analogy of Cassandra with SELECT id FROM table; .

+3
source share
1 answer

Take a look at get_range_slices

 list<KeySlice> get_range_slices(keyspace, column_parent, predicate, range, consistency_level) 

which replaces get_range_slice in 0.6.

Nb. For version <0.6: this method is only allowed when using a custodian that preserves order.

+4
source

Source: https://habr.com/ru/post/907205/


All Articles