You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2022/10/09 14:03:35 UTC
[incubator-kyuubi] branch master updated: [KYUUBI #3598] Beeline doesn't work with -e option when started in background
This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new 055fb22fb [KYUUBI #3598] Beeline doesn't work with -e option when started in background
055fb22fb is described below
commit 055fb22fb55ff8a2be9421ad82dec851a03f8c3a
Author: zhouyifan279 <zh...@gmail.com>
AuthorDate: Sun Oct 9 22:03:25 2022 +0800
[KYUUBI #3598] Beeline doesn't work with -e option when started in background
### _Why are the changes needed?_
Fix #3598
Hive Beeline has the same issue: https://issues.apache.org/jira/browse/HIVE-6758 and was fixed by append jline option "-Djline.termial=jline.UnsupportedTerminal".
We do the same in this PR.
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [x] Add screenshots for manual tests if appropriate
<img width="1043" alt="image" src="https://user-images.githubusercontent.com/88070094/194760564-04258a46-646f-4f76-ab19-b3e305b0ef69.png">
- [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
Closes #3599 from zhouyifan279/3598.
Closes #3598
3c11d27c [zhouyifan279] improve indent
6d39b3cc [zhouyifan279] Beeline doesn't work with -e option when started in background
Authored-by: zhouyifan279 <zh...@gmail.com>
Signed-off-by: Cheng Pan <ch...@apache.org>
---
bin/beeline | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/bin/beeline b/bin/beeline
index 91e6654bf..3581f6dd6 100755
--- a/bin/beeline
+++ b/bin/beeline
@@ -30,6 +30,11 @@ fi
RUNNER="${JAVA_HOME}/bin/java"
+# Append jline option to enable the Beeline process to run in background.
+if [[ ( ! $(ps -o stat= -p $$) =~ "+" ) && ! ( -p /dev/stdin ) ]]; then
+ export KYUUBI_BEELINE_OPTS="$KYUUBI_BEELINE_OPTS -Djline.terminal=jline.UnsupportedTerminal"
+fi
+
## Find the Kyuubi beeline Jar
if [[ -z "$KYUUBI_BEELINE_JARS" ]]; then
KYUUBI_BEELINE_JARS="$KYUUBI_HOME/beeline-jars"