Am 07.03.2011 02:10, schrieb Tyler Hobbs:
You want to add an index on a CF with TimeUUIDType column names? I think you've probably mistaken the purpose of compare_with. If you haven't, I think you'll need to add the index programmatically in order to specify a non ascii/unicode column name for the index.

I'd like to pull up Roland's original post here. We have the following situation: our IndexedSliceQueries work perfectly against our cassandra cluster, defining indexes via CLI:

create column family A with column_type='Standard' and
 comparator='TimeUUIDType' and keys_cached=200000 and read_repair_chance=1.0
 and rows_cached=0.0 and column_metadata=[{column_name:
 00000000-0000-1000-0000-000000000000, validation_class: UTF8Type,
 index_name: MyIndex, index_type: KEYS}];

The only stuff we can't get to work is with embedded cassandra instance for our unit tests. We currently define our indexes _for the embedded instance_ with the following yaml directives:

  - column_metadata: [{name: 00000000-0000-1000-0000-000000000000,
     validator_class: UTF8Type, index_name: MyIndex, index_type: KEYS}]
      compare_with: TimeUUIDType
      gc_grace_seconds: 864000
      keys_cached: 0.0
      max_compaction_threshold: 32
      min_compaction_threshold: 4
      name: A
      read_repair_chance: 1.0
      rows_cached: 0.0


So, the question remains: how can we transform our perfectly-working index definition from
above to a reasonable yaml-definition for an embedded instance?
If yaml isn't suitable for this task, what would be the preferred way to do it programmatically?

Jürgen

Reply via email to