Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.4.8
-
None
-
None
-
Issue observed only in hbase 2.4.8
Description
The following bash shell script invocations may stall or not `hbase shell -n` indefinitely (=until timeout). This might be how tty / pipes interact with the hbase shell. Opening this to better understand either if this is a bug or limitation in hbase shell, or what workarounds are there. The below samples and execution is with hbase 2.4.8, whilst in a containerized HBase 2.4.11 the stall issues don't appear.
Works executed in CLI bash
function check_alter_hbase () { HBASE_SHELL_CMD="hbase shell -n" hbase_state=$( echo "describe 'my_table'" | $HBASE_SHELL_CMD ) echo $hbase_state } export -f check_alter_hbase timeout 30s bash -c check_alter_hbase
Doesn't work as bash script, stalls until timeout **
# cat stall.sh function check_alter_hbase () { HBASE_SHELL_CMD="hbase shell -n" hbase_state=$( echo "describe 'my_table'" | $HBASE_SHELL_CMD ) echo $hbase_state } export -f check_alter_hbase timeout 30s bash -c check_alter_hbase # echo $? 124
Running the same bash stall logic in HBase 2.4.11 doesn't seem to reproduce the issue, though there is a slight difference that we have containers there (e.g. pod hbasemaster-0).
Works executed in CLI as bash script
# cat works.sh function check_alter_hbase () { HBASE_SHELL_CMD="hbase shell -n" hbase_state=$( echo "describe 'my_table'" | $HBASE_SHELL_CMD ) echo $hbase_state } export -f check_alter_hbase timeout --foreground 30s bash -c check_alter_hbase # bash works.sh Table my_table is ENABLED ... # echo $? 0
Doesn't work as internal init script, stalls (called indirectly not via CLI)
function check_alter_hbase () { HBASE_SHELL_CMD="hbase shell -n" hbase_state=$( echo "describe 'my_table'" | $HBASE_SHELL_CMD ) echo $hbase_state } export -f check_alter_hbase timeout --foreground 30s bash -c check_alter_hbase
Running the same bash stall logic in HBase 2.4.11 doesn't seem to reproduce the issue, though there is a slight difference that we have containers there (e.g. pod hbasemaster-0).