Search code examples
nosqlcassandrahector

Cassandra / Hector = Is there a function to jump to a position in the index?


does Cassandra/Hector provide a method, that supports "jumping" (=accessing) a specific position in an Index for both and:

((Rows))

and

Columns

I know of tombstones... I would not mind... (they can be included in the results/calculation)

IMPORTANT: I know that Rows are distributed over a lot of machines. So the question applies mainly to Columns (that reside on one machine).

I am looking for use cases like "Give me the "Record=((Row))/Column" that is exaclty in the middle of the index... Or give me the "Record=((Row))/Column" that is at Position 454654. Both for Rows and for Columns.

Is this somehow supported like getColumAtIndexPosition(int index) ? If not, why not? Wouldn't it be easy to just internally count the index records up to the correct position in Cassandra an return the rsult?

Thanks very much! Jens


Solution

  • There isn't such a function.

    Hector is a layer over the Cassandra api. For retrieving columns, the Cassandra api method that comes closest to what you want is get_slice, which allows you to perform queries such as get the first N columns where column name is > X, or all the columns whose name is between X and Y, but not the 500'th column.