[
https://issues.apache.org/jira/browse/HBASE-27742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
guluo reassigned HBASE-27742:
-----------------------------
Assignee: guluo
> Hbase shell non interactive stalls
> ----------------------------------
>
> Key: HBASE-27742
> URL: https://issues.apache.org/jira/browse/HBASE-27742
> Project: HBase
> Issue Type: Bug
> Components: shell
> Affects Versions: 2.4.8
> Environment: Issue observed only in hbase 2.4.8
> Reporter: Grigore Lupescu
> Assignee: guluo
> Priority: Major
>
> 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.
> {color:#00875a}Works executed in CLI bash{color}
> {code:java}
> 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{code}
> {color:#de350b}Doesn't work as bash script, stalls until timeout ** {color}
> {code:java}
> # 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{code}
> {color:#172b4d}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).{color}
> {color:#00875a}Works executed in CLI as bash script{color}
> {code:java}
> # 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{code}
> {color:#ff0000}Doesn't work as internal init script, stalls (called
> indirectly not via CLI){color}
> {code:java}
> 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
> {code}
> 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).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)