I am using
scan 'table_name', { COLUMNS => 'column_family:column_qualifier', LIMIT => 2 }
to list 2 rows in a hbase table but I would like to know if it is possible to achieve following using hbase shell:
Questions
- list all row keys through the hbase shell?
- list only those rows, whose row keys have a particular word in it?
A1.
hbase(main):015:0> count 'table_name', INTERVAL => 1
A2. Use
RowKey
filter withSubstringComparator
.Usage :
Earlier solution would be:
KeyOnlyFilter - takes no arguments. Returns the key portion of each key-value pair.
Syntax: KeyOnlyFilter ()