Sean Busbey created HBASE-25208:
-----------------------------------
Summary: Running an hbase-shell command in non-interactive mode
should not complain about missing files when it fails to talk to the cluster.
Key: HBASE-25208
URL: https://issues.apache.org/jira/browse/HBASE-25208
Project: HBase
Issue Type: Bug
Components: shell
Reporter: Sean Busbey
if you script out some shell commands, then run them via the shell in
non-interactive mode we sometimes give an erroneous "I couldn't find that file"
response when the master(s) are in a bad state instead of revealing the
underlying cluster issue.
e.g.
{code}
tmpfile=$(mktemp)
echo "balance_switch false" > $tmpfile
echo "exit" >> $tmpfile
$HBASE_BIN --config $CONF_DIR shell -n $tmpfile
RET=$?
rm $tmpfile
exit $RET
{code}
as an example, with a master stuck trying to initialize as active the failure
might look like
{code}
++ mktemp
+ tmpfile=/tmp/tmp.dMHTj0nVXx
+ echo balance_switch true
+ echo exit
+ bin/hbase --config /etc/hbase/conf shell -n /tmp/tmp.dMHTj0nVXx
LoadError: no such file to load -- /tmp/tmp.dMHTj0nVXx
load at org/jruby/RubyKernel.java:974
<main> at /some/path/to/lib/hbase/bin/hirb.rb:186
+ RET=1
+ rm /tmp/tmp.dMHTj0nVXx
+ exit 1
{code}
which is very confusing. the shell should report something related to an issue
talking to the cluster rather than a problem with the passed script.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)