如何检查Hbase中是否已经存在Namespace?

How to check whether Namespace already exists in Hbase or not?

我想检查天气命名空间是否已经存在于 Hbase 中,我怎样才能得到这个?

您可以通过

检查命名空间是否可用

hbase> list_namespace

您可以在 Hbase Shell Commands

中找到所有命名空间命令

从 shell 开始,您可以使用:

echo 'list_namespace' | hbase shell 2>/dev/null | grep 'ns_to_search'
echo $?