Skip to content

Commit ac388d1

Browse files
committed
[KYUUBI #5987] Always export KYUUBI_HOME in load-kyuubi-env.sh
# 🔍 Description ## Issue References 🔗 This is a follow-up of #5987, after applying #5987, I found a regression, the Kyuubi Server Java process can not see KYUUBI_HOME env if we don't declare KYUUBI_HOME as an env var explicitly, this breaks the main resources jar discovery of the engine, and eventually fails the engine bootstrap. ## Describe Your Solution 🔧 Restore `export KYUUBI_HOME` logic in `load-kyuubi-env.sh` ## Types of changes 🔖 - [x] 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 🧪 Build and start Kyuubi Server. ``` export SPARK_HOME=/Users/chengpan/app/spark-3.5.0-bin-hadoop3 build/dist --spark-provided --flink-provided --hive-provided dist/bin/kyuubi run ``` Open session to launch a Spark engine ``` dist/bin/beeline -u 'jdbc:hive2://0.0.0.0:10009/default' ``` #### Behavior Without This Pull Request ⚰️ A wrong `kyuubi-spark-sql-engine_2.12-1.9.0-SNAPSHOT.jar` location was found. ``` /Users/chengpan/app/spark-3.5.0-bin-hadoop3/bin/spark-submit \ ... --proxy-user chengpan /Users/chengpan/Projects/apache-kyuubi/dist/jars/externals/kyuubi-spark-sql-engine/target/kyuubi-spark-sql-engine_2.12-1.9.0-SNAPSHOT.jar ``` #### Behavior With This Pull Request 🎉 The correct `kyuubi-spark-sql-engine_2.12-1.9.0-SNAPSHOT.jar` location was found. ``` /Users/chengpan/app/spark-3.5.0-bin-hadoop3/bin/spark-submit \ ... --proxy-user chengpan /Users/chengpan/Projects/apache-kyuubi/dist/externals/engines/spark/kyuubi-spark-sql-engine_2.12-1.9.0-SNAPSHOT.jar ``` --- # 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 #6004 from pan3793/5987-followup. Closes #5987 a4e40b6 [Cheng Pan] [KYUUBI #5987] Always export KYUUBI_HOME in load-kyuubi-env.sh Authored-by: Cheng Pan <[email protected]> Signed-off-by: Cheng Pan <[email protected]>
1 parent de4410d commit ac388d1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

bin/load-kyuubi-env.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616
# limitations under the License.
1717
#
1818

19-
20-
if [ -z "${KYUUBI_HOME}" ]; then
21-
export KYUUBI_HOME="$(cd "$(dirname "$0")"/.. || exit; pwd)"
22-
fi
19+
export KYUUBI_HOME="${KYUUBI_HOME:-"$(cd "$(dirname "$0")"/.. || exit; pwd)"}"
2320
export KYUUBI_CONF_DIR="${KYUUBI_CONF_DIR:-"${KYUUBI_HOME}"/conf}"
2421

2522
silent=0

0 commit comments

Comments
 (0)