I want a software that depends on HBase, and must be started only after it's fully started and ready for business, but it seems like start-hbase.sh returns before this happens.
我想要一个依赖于HBase的软件,并且只有在它完全启动并为业务做好准备之后才能启动,但似乎start-hbase.sh在此之前返回。
Is there any way to check/wait for HBase status?
有没有办法检查/等待HBase状态?
I tried something like echo "status" | hbase shell
, but it doesn't return while HBase is offline. I'd like to get a status code or text saying wheter it's ready or not.
我尝试过echo“status”| hbase shell,但在HBase脱机时它不会返回。我想得到一个状态代码或文字,说明它是否准备就绪。
1 个解决方案
#1
0
We check the following components:
我们检查以下组件:
1) checking hbase/bin/hbase shell
for insert\list 'testtable':
1)检查hbase / bin / hbase shell是否为insert \ list'testtable':
echo "create 'testtable', {NAME=>'colfam'}" | hbase_home/bin/hbase shell
echo "list" | hbase_home/bin/hbase shell
2) hbase/bin/hbase hbck | grep "INCONSISTENT"
return non-zero code (all hbase data are consistent).
2)hbase / bin / hbase hbck | grep“INCONSISTENT”返回非零代码(所有hbase数据都是一致的)。
It's enough to be sure hbase is ready, but I'm trying to find more easy way now.
这足以确保hbase准备就绪,但我现在正试图找到更简单的方法。
#1
0
We check the following components:
我们检查以下组件:
1) checking hbase/bin/hbase shell
for insert\list 'testtable':
1)检查hbase / bin / hbase shell是否为insert \ list'testtable':
echo "create 'testtable', {NAME=>'colfam'}" | hbase_home/bin/hbase shell
echo "list" | hbase_home/bin/hbase shell
2) hbase/bin/hbase hbck | grep "INCONSISTENT"
return non-zero code (all hbase data are consistent).
2)hbase / bin / hbase hbck | grep“INCONSISTENT”返回非零代码(所有hbase数据都是一致的)。
It's enough to be sure hbase is ready, but I'm trying to find more easy way now.
这足以确保hbase准备就绪,但我现在正试图找到更简单的方法。