Skip to content

Instantly share code, notes, and snippets.

@sankars
Created February 22, 2013 07:52
Show Gist options
  • Save sankars/5011614 to your computer and use it in GitHub Desktop.
Save sankars/5011614 to your computer and use it in GitHub Desktop.
Filter from Hbase shell.
import org.apache.hadoop.hbase.filter.CompareFilter
import org.apache.hadoop.hbase.filter.SingleColumnValueFilter
import org.apache.hadoop.hbase.filter.SubstringComparator
import org.apache.hadoop.hbase.util.Bytes
scan 't1', { COLUMNS => 'family:qualifier', FILTER =>
SingleColumnValueFilter.new
(Bytes.toBytes('family'),
Bytes.toBytes('qualifier'),
CompareFilter::CompareOp.valueOf('EQUAL'),
SubstringComparator.new('somevalue'))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment