如何从java客户端列出所有HBase M7表

时间:2014-08-07 12:00:59

标签: hbase mapr

我可以使用命令 -

列出HbaseM7表

hbase> list' / mapr / cluster / tables /'

但是,当我尝试使用HBaseManager列出表时,它没有锻炼..代码片段配置conf = //设置所有m7集群; HBaseAdmin admin = new HBaseAdmin(conf); HTableDescriptor [] tables = admin.listTables()

有没有办法将表位置传递给listTables()函数,或者可能是我必须设置的某些属性?

2 个答案:

答案 0 :(得分:0)

这是我的问题的解决方案...... mapr docs

但这需要配置更新,我们没有该访问权限。我试过一些工作 -

我使用ProcessBuilder从java客户端运行下面​​的shell命令,并从中检索表的列表。

echo "list '/mapr/cluster/tables/'" | hbase shell

答案 1 :(得分:0)

您不需要服务器端配置。您可以在客户端执行表命名空间映射。请在此处查看Aditya的答案Try to use hbase client communicate with Map M7 native table

相关问题