hbase-shell
create 'blog', 'info', 'content'
list
put 'blog', '20130320162535', 'info:title', 'Why use HBase?'
put 'blog', '20130320162535', 'info:author', 'Jane Doe'
put 'blog', '20130320162535', 'info:category', 'Persistence'
put 'blog', '20130320162535', 'content:pg', 'HBase is a column-oriented...'
put 'blog', '20130320162535', 'content:pg1', 'HBase is a column-oriented...'
get 'blog', '20130320162535'
scan 'blog', { STARTROW => '20130300', STOPROW => '20130400' }
delete 'blog', '20130320162535', 'info:category'
get 'blog', '20130320162535'
scan 'blog', { STARTROW => '20130300', STOPROW => '20130500', COLUMNS => 'info:title' }
disable 'blog'
drop 'emp'
exists 'emp'
create 'city','cityinfo','otherdetails'
sqoop import \
--connect jdbc:mysql://localhost/world \
--username root -P \
--table City \
--columns "id,name,countryCode" \
--hbase-table city \
--column-family cityinfo \
--hbase-row-key id -m 1
create 'blog', 'info', 'content'
list
put 'blog', '20130320162535', 'info:title', 'Why use HBase?'
put 'blog', '20130320162535', 'info:author', 'Jane Doe'
put 'blog', '20130320162535', 'info:category', 'Persistence'
put 'blog', '20130320162535', 'content:pg', 'HBase is a column-oriented...'
put 'blog', '20130320162535', 'content:pg1', 'HBase is a column-oriented...'
get 'blog', '20130320162535'
scan 'blog', { STARTROW => '20130300', STOPROW => '20130400' }
delete 'blog', '20130320162535', 'info:category'
get 'blog', '20130320162535'
scan 'blog', { STARTROW => '20130300', STOPROW => '20130500', COLUMNS => 'info:title' }
disable 'blog'
drop 'emp'
exists 'emp'
create 'city','cityinfo','otherdetails'
sqoop import \
--connect jdbc:mysql://localhost/world \
--username root -P \
--table City \
--columns "id,name,countryCode" \
--hbase-table city \
--column-family cityinfo \
--hbase-row-key id -m 1
No comments:
Post a Comment