public List <K> getRowKeyList <K>(string keyspace, Object columnFamily) { client.set_keyspace(keyspace); KeyRange range = new KeyRange(); range.Count = ALL_COUNT; range.Start_key = new byte[0]; range.End_key = new byte[0]; SlicePredicate sp = new SlicePredicate(); sp.Slice_range = new SliceRange(); sp.Slice_range.Start = new byte[0]; sp.Slice_range.Finish = new byte[0]; sp.Slice_range.Reversed = false; sp.Slice_range.Count = ALL_COUNT; ColumnParent cp = new ColumnParent() { Column_family = columnFamily.ToString() }; List <KeySlice> rows = client.get_range_slices(cp, sp, range, consistencyLevel); List <K> list = new List <K>(); foreach (var row in rows) { list.Add((K)row.Key.ToObjectFromByteArray(typeof(K))); } return(list); }
public override void Execute(Apache.Cassandra.Cassandra.Client cassandraClient, ILog logger) { Output = null; var columnParent = BuildColumnParent(); var result = cassandraClient.get_range_slices(columnParent, predicate.ToCassandraSlicePredicate(), keyRange.ToCassandraKeyRange(), consistencyLevel); BuildOut(result); }