-
Notifications
You must be signed in to change notification settings - Fork 919
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# 🔍 Description Discussion in mailing thread: https://lists.apache.org/thread/tnmz71o3rypy7qvs3899p3jkkq4xqb4r I propose to rename the `bin/beeline` to `bin/kyuubi-beeline`, while for compatibility, we may still want to keep the alias `bin/beeline` for a while. In a real Hadoop cluster, it’s likely to add `$HIVE_HOME/bin`, `$SPARK_HOME/bin`, `$KYUUBI_HOME/bin` to the `$PATH`, at the current state, when performing `beeline`, which one is called depends on the declaration order. It does not matter for Spark’s `bin/beeline` because it’s a vanilla Hive BeeLine, but in Kyuubi, we have made some improvements based on vanilla Hive BeeLine, so the behavior is not exactly same as Hive’s BeeLine. An identical name would solve this problem. And I saw some vendors[1] who shippes Kyuubi already have done the same thing. [1] https://help.aliyun.com/zh/emr/emr-on-ecs/user-guide/connect-to-kyuubi ## Types of changes 🔖 - [ ] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan 🧪 Manual test. ``` $ bin/beeline -u 'jdbc:kyuubi://0.0.0.0:10009/' Warning: beeline is deprecated and will be removed in the future, please use kyuubi-beeline instead. Connecting to jdbc:kyuubi://0.0.0.0:10009/ Connected to: Spark SQL (version 3.4.1) Driver: Kyuubi Project Hive JDBC Client (version 1.10.0-SNAPSHOT) Beeline version 1.10.0-SNAPSHOT by Apache Kyuubi 0: jdbc:kyuubi://0.0.0.0:10009/> ``` ``` $ bin/kyuubi-beeline -u 'jdbc:kyuubi://0.0.0.0:10009/' Connecting to jdbc:kyuubi://0.0.0.0:10009/ Connected to: Spark SQL (version 3.4.1) Driver: Kyuubi Project Hive JDBC Client (version 1.10.0-SNAPSHOT) Beeline version 1.10.0-SNAPSHOT by Apache Kyuubi 0: jdbc:kyuubi://0.0.0.0:10009/> ``` --- # Checklist 📝 - [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes #6239 from pan3793/kyuubi-beeline. Closes #6239 cec8f56 [Cheng Pan] docs b3446ba [Cheng Pan] docs 46a1150 [Cheng Pan] Remove `bin/beeline` to `bin/kyuubi-beeline` Authored-by: Cheng Pan <[email protected]> Signed-off-by: Cheng Pan <[email protected]>
- Loading branch information
Showing
16 changed files
with
125 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
## Kyuubi BeeLine Entrance | ||
CLASS="org.apache.hive.beeline.KyuubiBeeLine" | ||
|
||
if [ -z "${KYUUBI_HOME}" ]; then | ||
KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)" | ||
fi | ||
|
||
. "${KYUUBI_HOME}/bin/load-kyuubi-env.sh" -s | ||
|
||
if [[ -z ${JAVA_HOME} ]]; then | ||
echo "Error: JAVA_HOME IS NOT SET! CANNOT PROCEED." | ||
exit 1 | ||
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" | ||
if [[ ! -d ${KYUUBI_BEELINE_JARS} ]]; then | ||
echo -e "\nCandidate Kyuubi beeline jars $KYUUBI_BEELINE_JARS doesn't exist, using $KYUUBI_HOME/kyuubi-hive-beeline/target/" | ||
KYUUBI_BEELINE_JARS="$KYUUBI_HOME/kyuubi-hive-beeline/target" | ||
fi | ||
fi | ||
|
||
if [[ -z ${YARN_CONF_DIR} ]]; then | ||
KYUUBI_BEELINE_CLASSPATH="${KYUUBI_BEELINE_JARS}/*:${HADOOP_CONF_DIR}" | ||
else | ||
KYUUBI_BEELINE_CLASSPATH="${KYUUBI_BEELINE_JARS}/*:${HADOOP_CONF_DIR}:${YARN_CONF_DIR}" | ||
fi | ||
|
||
if [[ -f ${KYUUBI_CONF_DIR}/log4j2-repl.xml ]]; then | ||
KYUUBI_CTL_JAVA_OPTS="${KYUUBI_CTL_JAVA_OPTS} -Dlog4j2.configurationFile=log4j2-repl.xml" | ||
fi | ||
|
||
exec ${RUNNER} ${KYUUBI_BEELINE_OPTS} -cp ${KYUUBI_BEELINE_CLASSPATH} $CLASS "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.