hbase:003:0> create 'test','cf' Created table test Took 0.9345 seconds => Hbase::Table - test
hbase:004:0> list 'test' TABLE test 1 row(s) Took 0.0187 seconds => ["test"]
hbase:006:0> describe 'test' Table test is ENABLED test COLUMN FAMILIES DESCRIPTION {NAME => 'cf', BLOOMFILTER => 'ROW', IN_MEMORY => 'false', VERSIONS => '1', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'NONE', COMPRESSION => 'NONE', TTL => 'FOREVER', MIN_VERSIONS => '0', BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'} 1 row(s) Quota is disabled Took 0.1167 seconds
hbase:007:0> put 'test','row1','cf:a','value1' Took 0.0781 seconds hbase:008:0> put 'test','row2','cf:b','value2' Took 0.0024 seconds hbase:009:0> put 'test','row3','cf:c','value3' Took 0.0028 seconds
hbase:010:0> scan 'test' ROW COLUMN+CELL row1 column=cf:a, timestamp=2021-07-02T15:27:50.999, value=value1 row2 column=cf:b, timestamp=2021-07-02T15:28:03.776, value=value2 row3 column=cf:c, timestamp=2021-07-02T15:28:13.198, value=value3 3 row(s) Took 0.0241 seconds
hbase:011:0> get 'test','row1' COLUMN CELL cf:a timestamp=2021-07-02T15:27:50.999, value=value1 1 row(s) Took 0.0107 seconds
hbase:012:0> disable 'test' Took 0.3510 seconds hbase:013:0> enable 'test' Took 0.6492 seconds
drop 'test'
退出webshell
quit
hbase> merge_region 'FULL_REGIONNAME', 'FULL_REGIONNAME' hbase> merge_region 'FULL_REGIONNAME', 'FULL_REGIONNAME', 'FULL_REGIONNAME', ... hbase> merge_region 'FULL_REGIONNAME', 'FULL_REGIONNAME', 'FULL_REGIONNAME', ..., true hbase> merge_region ['FULL_REGIONNAME', 'FULL_REGIONNAME'] hbase> merge_region ['FULL_REGIONNAME', 'FULL_REGIONNAME', 'FULL_REGIONNAME', ...] hbase> merge_region ['FULL_REGIONNAME', 'FULL_REGIONNAME', 'FULL_REGIONNAME', ...], true hbase> merge_region 'ENCODED_REGIONNAME', 'ENCODED_REGIONNAME' hbase> merge_region 'ENCODED_REGIONNAME', 'ENCODED_REGIONNAME', 'ENCODED_REGIONNAME', ... hbase> merge_region 'ENCODED_REGIONNAME', 'ENCODED_REGIONNAME', 'ENCODED_REGIONNAME', ..., true hbase> merge_region ['ENCODED_REGIONNAME', 'ENCODED_REGIONNAME'] hbase> merge_region ['ENCODED_REGIONNAME', 'ENCODED_REGIONNAME', 'ENCODED_REGIONNAME', ...] hbase> merge_region ['ENCODED_REGIONNAME', 'ENCODED_REGIONNAME', 'ENCODED_REGIONNAME', ...], true
hbase> scan 'hbase:meta' hbase> scan 'hbase:meta', {COLUMNS => 'info:regioninfo'} hbase> scan 'ns1:t1', {COLUMNS => ['c1', 'c2'], LIMIT => 10, STARTROW => 'xyz'} hbase> scan 't1', {COLUMNS => ['c1', 'c2'], LIMIT => 10, STARTROW => 'xyz'} hbase> scan 't1', {COLUMNS => 'c1', TIMERANGE => [1303668804000, 1303668904000]} hbase> scan 't1', {REVERSED => true} hbase> scan 't1', {ALL_METRICS => true} hbase> scan 't1', {METRICS => ['RPC_RETRIES', 'ROWS_FILTERED']} hbase> scan 't1', {ROWPREFIXFILTER => 'row2', FILTER => " (QualifierFilter (>=, 'binary:xyz')) AND (TimestampsFilter ( 123, 456))"} hbase> scan 't1', {FILTER => org.apache.hadoop.hbase.filter.ColumnPaginationFilter.new(1, 0)} hbase> scan 't1', {CONSISTENCY => 'TIMELINE'} hbase> scan 't1', {ISOLATION_LEVEL => 'READ_UNCOMMITTED'} hbase> scan 't1', {MAX_RESULT_SIZE => 123456} For setting the Operation Attributes hbase> scan 't1', { COLUMNS => ['c1', 'c2'], ATTRIBUTES => {'mykey' => 'myvalue'}} hbase> scan 't1', { COLUMNS => ['c1', 'c2'], AUTHORIZATIONS => ['PRIVATE','SECRET']}
hbase:001:0> help 'major_compact' Run major compaction on passed table or pass a region row to major compact an individual region. To compact a single column family within a region specify the region name followed by the column family name. Examples: Compact all regions in a table: hbase> major_compact 't1' hbase> major_compact 'ns1:t1' Compact an entire region: hbase> major_compact 'r1' Compact a single column family within a region: hbase> major_compact 'r1', 'c1' Compact a single column family within a table: hbase> major_compact 't1', 'c1' Compact table with type "MOB" hbase> major_compact 't1', nil, 'MOB' Compact a column family using "MOB" type within a table hbase> major_compact 't1', 'c1', 'MOB'