Cassandra - 使用列切片获取多行

时间:2012-02-15 15:49:30

标签: cassandra

是否可以执行此类查询?

MultigetSliceQuery<String, String, String> multigetSliceQuery =
    HFactory.createMultigetSliceQuery(keyspace, stringSerializer, stringSerializer, stringSerializer);
multigetSliceQuery.setColumnFamily("Standard1");
multigetSliceQuery.setKeys("fake_key_0", "fake_key_1");
multigetSliceQuery.setRange("A", "C", false, 3);
Result<Rows<String, String, String>> result = multigetSliceQuery.execute();

按键获取行:“fake_key_0”,“fake_key_1”和A和C之间的列切片