I think this fits what I'm trying to do, but have been having a heck of a
time with it.

I'm using a SingleColumnValueFilter to get rows who's cf:qual have a given
value, but would just like the key, no values.  If I add that filter to a
filterList with a KeyOnlyFilter.new, I get nothing if KeyOnlyFilter is 
first and everything, as if there wasn't a KeyOnlyFilter, when it's last.

I'm writing it in a ruby script.


filterList = FilterList.new
filterList.addFilter(KeyOnlyFilter.new)
filterList.addFilter(SingleColumnValueFilter.new(Bytes.toBytes(cf),
   Bytes.toBytes(qualifier), CompareFilter::CompareOp.valueOf('EQUAL'),
   SubstringComparator.new(string)))
scan.setCaching(2)
scan.setFilter(filterList)
result_scanner = table.getScanner(scan)

result_scanner.each do |res|
  puts(res)
end

result_scanner.close


Scott

Reply via email to