Created
February 22, 2013 07:52
-
-
Save sankars/5011614 to your computer and use it in GitHub Desktop.
Filter from Hbase shell.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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