./bin/hbase shell
woir> list
woir> status
woir> version
woir> table_help
woir> whoami
woir> create 'woir', 'family data', ’work data’
woir> disable 'woir'
woir> is_disabled 'table name'
woir> is_disabled 'woir'
woir> disable_all 'amar.*'
woir> enable 'woir'
woir> scan 'woir'
woir> is_enabled 'table name'
woir> is_enabled 'woir'
woir> describe 'woir'
woir> alter 'woir', NAME => 'family data', VERSIONS => 5
woir> alter 'woir', READONLY
woir> alter 't1', METHOD => 'table_att_unset', NAME => 'MAX_FILESIZE'
woir> alter ‘ table name ’, ‘delete’ => ‘ column family ’
woir> scan 'woir'
woir> alter 'woir','delete'=>'work'
woir> scan 'woir'
woir> exists 'woir'
woir> exists 'student'
woir> exists 'student'
woir> drop 'woir'
woir> exists 'woir'
woir> drop_all ‘t.*’
./bin/stop-hbase.sh
woir> put 'woir','1','family data:name','kaka'
woir> put 'woir','1','work
woir> put 'woir','1','work data:salary','50000'
woir> scan 'woir'
woir> put 'woir','row1','family:city','Delhi'
woir> scan 'woir'
woir> get 'woir', '1'
woir>get 'table name', ‘rowid’, {COLUMN => ‘column family:column name ’}
woir> get 'woir', 'row1', {COLUMN=>'family:name'}
woir> delete 'woir', '1', 'family data:city', 1417521848375
woir> deleteall 'woir','1'
woir> scan 'woir'
woir> count 'woir'
woir> truncate 'table name'
Command |
Usage |
hbase> scan ‘.META.’, {COLUMNS => ‘info:regioninfo’} |
It display all the meta data information related to columns that are present in the tables in HBase |
hbase> scan ‘woir’, {COLUMNS => [‘c1’, ‘c2’], LIMIT => 10, STARTROW => ‘abc’} |
It display contents of table guru99 with their column families c1 and c2 limiting the values to 10 |
hbase> scan ‘woir’, {COLUMNS => ‘c1’, TIMERANGE => [1303668804, 1303668904]} |
It display contents of guru99 with its column name c1 with the values present in between the mentioned time range attribute value |
hbase> scan ‘woir’, {RAW => true, VERSIONS =>10} |
In this command RAW=> true provides advanced feature like to display all the cell values present in the table guru99 |
examples