Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hbase row filter from hbase shell

Hbase row filter from hbase shell


Hi ,

I am trying do filter on rowkey which is combination of 3 columns in my case which are separated by a space.i want to query on filter conditions on 2 columns..below is how my data looks in hbase and hbase queries i am using.

i want to query on rowkey which contains values row1 and can i do that

hbase(main):003:0> scan 'testspaces' ROW COLUMN+CELL row1 gud column=cf:a2, timestamp=1523548834897, value=value1e row1 rad column=cf:a2, timestamp=1523548716606, value=value1e row1 sec column=cf:a2, timestamp=1523548822010, value=value1e row2 rad exam column=cf:a3, timestamp=1523548741273, value=vale1e 4 row(s) in 0.0150 seconds scan 'testspaces',{FILTER =>"(PrefixFilter('row1') OR PrefixFilter('sec')"} scan 'testspaces', { LIMIT => 3, FILTER => "org.apache.hadoop.hbase.filter.RowFilter( =, 'row1') AND ValueFilter( =, 'sec'} scan 'testspaces', {FILTER =>'EQUAL'),"sec")) AND'EQUAL'),"row1"))}


Re: Hbase row filter from hbase shell

Super Collaborator

your last (third) query should be fine, do you get any error message? not sure if you need to put brackets around the row filters like { FILTER => (filterA AND filterB) }

Don't have an account?
Coming from Hortonworks? Activate your account here