[英]cassandra : Is there a way to get all value of columns starting with a particular prefix?
我需要獲取鍵的所有column:column_value對。 約束是列具有通用的前綴,是否可以使用Hector獲得它?
您可以執行SliceQuery,並執行從前綴到prefix |的范圍,並提供僅適用的字母數字。
StringSerializer ss = StringSerializer.get();
SliceQuery sliceQuery = HFactory.createSliceQuery(keySpace, rowSerializer, ss, ss);
sliceQuery.setColumnFamily(MY_COLUMN_FAMILY);
sliceQuery.setKey(rowKey);
sliceQuery.setRange("prefix", "prefix|", false, Integer.MAX_INT);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.