欢迎投稿

今日深度:

hbase shell,

hbase shell,


为什么80%的码农都做不了架构师?>>>   

http://www.cnblogs.com/kaituorensheng/p/3814925.html

http://itlab.idcquan.com/linux/set/939223_2.html


重要点:

(4)扫描所有数据

  scan 'scores'

  也可以指定一些修饰词:TIMERANGE, FILTER, LIMIT, STARTROW, STOPROW, TIMESTAMP, MAXLENGTH,or COLUMNS.没任何修饰词,就是上边例句,就会显示所有数据行。

  例句如下:

  hbase> scan '.META.'

  hbase> scan '.META.', {COLUMNS => 'info:regioninfo'}

  hbase> scan 't1′, {COLUMNS => ['c1', 'c2'], LIMIT => 10, STARTROW => 'xyz'}

  hbase> scan 't1′, {COLUMNS => 'c1′, TIMERANGE => [1303668804, 1303668904]}

  hbase> scan 't1′, {FILTER => "(PrefixFilter ('row2′) AND (QualifierFilter (>=, 'binary:xyz'))) AND (TimestampsFilter ( 123, 456))"}

  hbase> scan 't1′, {FILTER => org.apache.hadoop.hbase.filter.ColumnPaginationFilter.new(1, 0)}

  过滤器filter有两种方法指出:

  a. Using a filterString – more information on this is available in the

  Filter Language document attached to the HBASE-4176 JIRA

  b. Using the entire package name of the filter.

  还有一个CACHE_BLOCKS修饰词,开关scan的缓存的,默认是开启的(CACHE_BLOCKS=>true),可以选择关闭(CACHE_BLOCKS=>false)。


scan "task_logs",{FILTER => "(PrefixFilter('17309'))",LIMIT =>10}


转载于:https://my.oschina.net/xiangtao/blog/515738

www.htsjk.Com true http://www.htsjk.com/hbase/40718.html NewsArticle hbase shell, 为什么80%的码农都做不了架构师?    http://www.cnblogs.com/kaituorensheng/p/3814925.html http://itlab.idcquan.com/linux/set/939223_2.html 重要点: (4)扫描所有数据 scan 'scores' 也可以指定一些...
相关文章
    暂无相关文章
评论暂时关闭