如何找到给定HBase表的区域数?

如何找到给定HBase表的区域数?,hbase,Hbase,我认为这很容易,但找不到任何答案。希望这可以使用命令行工具来完成。或者一个Python工具 或者至少找出有多少个hfiles?您有几个选项: 1通过HTTP: 2命令行: $ hadoop fs -ls /hbase/[your_table] Found 8 items -rw-r--r-- 3 hbase hbase 1893 2013-05-25 18:03 /hbase/[your_table]/.tableinfo.0000000001 drwxr-xr-x - h

我认为这很容易,但找不到任何答案。希望这可以使用命令行工具来完成。或者一个Python工具


或者至少找出有多少个hfiles?

您有几个选项:

1通过HTTP:

2命令行:

$ hadoop fs -ls /hbase/[your_table]

Found 8 items
-rw-r--r--   3 hbase hbase       1893 2013-05-25 18:03 /hbase/[your_table]/.tableinfo.0000000001
drwxr-xr-x   - hbase hbase          0 2013-05-25 18:03 /hbase/[your_table]/.tmp
drwxr-xr-x   - hbase hbase          0 2014-11-04 06:34 /hbase/[your_table]/045ab87f468ba9e967a0987ca98b7db4
drwxr-xr-x   - hbase hbase          0 2014-11-04 06:34 /hbase/[your_table]/062bc3ef65b9db80a1eeb2c1f4229fdb
drwxr-xr-x   - hbase hbase          0 2014-11-04 06:34 /hbase/[your_table]/0a921049a908dbc929b160210a397632
drwxr-xr-x   - hbase hbase          0 2014-11-04 06:34 /hbase/[your_table]/43a9576bad8845f7d7baacc97882eec6
drwxr-xr-x   - hbase hbase          0 2014-11-04 06:34 /hbase/[your_table]/f492c709d17c4ded150014543f21e362
drwxr-xr-x   - hbase hbase          0 2014-11-04 06:34 /hbase/[your_table]/fa465c6a27023d49893de3c1004efd29
每个区域将有一个目录(不包括.tmp y.tableinfo):


3在JAVA中,您可以使用

不知何故,2号命令行对我不起作用。我使用cdh5.3.0(hbase.0.98.6),但在/hbase文件夹下没有看到表名。。但是没有一个适合我。谢谢似乎在CDH5+中,他们已经移动了HDFS目录,可以使用
hadoop fs-ls/
查找新目录,或者找到HDFS-site.xml文件并查找hbase.rootdir属性。