【问题标题】:HBase shell command to get the size of a particular tableHBase shell 命令获取特定表的大小
【发布时间】:2017-02-19 18:42:58
【问题描述】:

如何从 HBase shell 获取特定 HBase 表的大小?

【问题讨论】:

标签: linux hbase


【解决方案1】:

数据存在于目录中的 hdfs

hdfs dfs -ls  /hbase/data/

HDFS 上的表大小

hdfs dfs -du -h  /hbase/data/<UserName>

用于查找特定表中的行数

hbase org.apache.hadoop.hbase.mapreduce.RowCounter 'tableName'

counter can be verified from 
org.apache.hadoop.hbase.mapreduce.RowCounter$RowCounterMapper$Counters

OR counter from the Hbase shell
hbase(main):001:0> count 'tablename'

【讨论】:

    【解决方案2】:

    只需查看 HBase 文档

    count 'tablename', INTERVAL => 100000
    

    【讨论】:

    • Count 命令返回表中的行数而不是大小。
    猜你喜欢
    • 2012-09-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-12
    • 2019-11-10
    • 2017-12-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多