$
hbase shell
hbase>
create 'orders', 'client', 'product'
hbase>
describe 'orders'
hbase>
put 'orders', 'joe_2013-01-13', 'client:name', 'Joe'
hbase>
put 'orders', 'joe_2013-01-13', 'client:address', 'Hillroad 1, SF'
hbase>
put 'orders', 'joe_2013-01-13', 'product:title', 'iPhone 5'
hbase>
put 'orders', 'joe_2013-01-13', 'product:delivery', '2013-01-13'
hbase>
scan 'orders'
hbase>
put 'orders', 'jane_2013-02-05', 'client:name', 'Jane'
hbase>
put 'orders', 'jane_2013-02-05', 'client:address', 'Sunset Drive 42, NY'
hbase>
put 'orders', 'jane_2013-02-05', 'product:title', 'Samsung S4'
hbase>
put 'orders', 'jane_2013-02-05', 'product:delivery', '2013-05-02'
hbase>
get 'orders', 'jane_2013-02-05', {COLUMN => 'product:'}
hbase>
scan 'orders', FILTER => "ValueFilter(=,'substring:Sunset')"
hbase>
scan 'orders', { COLUMNS => ['client'], FILTER =>
"ValueFilter(=,'substring:road')"
}
hbase>
scan 'orders', { COLUMNS => ['product'], FILTER =>
"ValueFilter(=,'substring:2013-')"
}
hbase>
disable 'orders'
hbase>
drop 'orders'
hbase>
list
hbase>
exit
No comments:
Post a Comment