1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| #语法 #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']}
# 扫描全表,全部字段 scan 'test' # 查询指定列族所有记录 # scan '表名',{COLUMNS=>'列族名'} scan 'test',{COLUMNS=>'info'} # 只取cf列族的a字段 # scan '表名',{COLUMNS=>'列族名:字段名'} scan 'test',{COLUMNS=>['cf:a']} # 只取cf列族的a字段一条 scan 'test',{COLUMNS=>['cf:a'],LIMIT=>1} # 查询指定区间 scan 'test',{COLUMNS=>['cf:a'],LIMIT=>5,STARTROW=>'2',STOPROW=>'7'}
|