Search code examples
hbasemapr

How to list all HBase M7 tables from java client


i am able to list HbaseM7 tables using command-

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

But, when I am trying to list the tables using HBaseManager it doesn't workout.. code snippet Configuration conf =//set all m7 cluster; HBaseAdmin admin = new HBaseAdmin(conf); HTableDescriptor[] tables = admin.listTables()

is there any way to pass the table location to listTables() function or may be some property i have to set?


Solution

  • here is solution for my problem ...mapr docs

    But this require configuration update and we don't have that access. some work around i tried-

    I ran below shell command from java client using ProcessBuilder and retrieve the list of tables from it.

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