Skip to content

Commit 35ea750

Browse files
yanghuapan3793
authored andcommitted
[KYUUBI #1774] Export FLINK_HOME in load-kyuubi-env script
<!-- Thanks for sending a pull request! Here are some tips for you: 1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html 2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'. 3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'. --> ### _Why are the changes needed?_ <!-- Please clarify why the changes are needed. For instance, 1. If you add a feature, you can talk about the use case of it. 2. If you fix a bug, you can clarify why it is a bug. --> ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [ ] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #1793 from yanghua/KYUUBI-1774. Closes #1774 178a628 [yanghua] minor fix ba7cc20 [yanghua] reorder code 7f15ffb [yanghua] refactor code 85aa185 [yanghua] [KYUUBI #1774] Export FLINK_HOME in load-kyuubi-env script Authored-by: yanghua <yanghua1127@gmail.com> Signed-off-by: Cheng Pan <chengpan@apache.org>
1 parent 916f81a commit 35ea750

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

bin/load-kyuubi-env.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,21 @@ export KYUUBI_SCALA_VERSION="${KYUUBI_SCALA_VERSION:-"2.12"}"
7272

7373
if [[ -f ${KYUUBI_HOME}/RELEASE ]]; then
7474
KYUUBI_VERSION="$(grep "Kyuubi " "$KYUUBI_HOME/RELEASE" | awk -F ' ' '{print $2}')"
75+
FLINK_VERSION_BUILD="$(grep "Flink " "$KYUUBI_HOME/RELEASE" | awk -F ' ' '{print $2}')"
7576
SPARK_VERSION_BUILD="$(grep "Spark " "$KYUUBI_HOME/RELEASE" | awk -F ' ' '{print $2}' | grep -v 'Hadoop')"
7677
HADOOP_VERSION_BUILD="$(grep "Spark Hadoop " "$KYUUBI_HOME/RELEASE" | awk -F ' ' '{print $3}')"
78+
FLINK_BUILTIN="${KYUUBI_HOME}/externals/flink-$FLINK_VERSION_BUILD"
7779
SPARK_BUILTIN="${KYUUBI_HOME}/externals/spark-$SPARK_VERSION_BUILD-bin-hadoop${HADOOP_VERSION_BUILD:0:3}"
7880
else
7981
MVN="${MVN:-"${KYUUBI_HOME}/build/mvn"}"
8082
KYUUBI_VERSION=$("$MVN" help:evaluate -Dexpression=project.version 2>/dev/null\
8183
| grep -v "INFO"\
8284
| grep -v "WARNING"\
8385
| tail -n 1)
86+
FLINK_VERSION_BUILD=$("$MVN" help:evaluate -Dexpression=flink.version 2>/dev/null\
87+
| grep -v "INFO"\
88+
| grep -v "WARNING"\
89+
| tail -n 1)
8490
SPARK_VERSION_BUILD=$("$MVN" help:evaluate -Dexpression=spark.version 2>/dev/null\
8591
| grep -v "INFO"\
8692
| grep -v "WARNING"\
@@ -89,9 +95,11 @@ else
8995
| grep -v "INFO"\
9096
| grep -v "WARNING"\
9197
| tail -n 1)
98+
FLINK_BUILTIN="${KYUUBI_HOME}/externals/kyuubi-download/target/flink-$FLINK_VERSION_BUILD"
9299
SPARK_BUILTIN="${KYUUBI_HOME}/externals/kyuubi-download/target/spark-$SPARK_VERSION_BUILD-bin-hadoop${HADOOP_VERSION_BUILD}"
93100
fi
94101

102+
export FLINK_HOME="${FLINK_HOME:-"${FLINK_BUILTIN}"}"
95103
export SPARK_HOME="${SPARK_HOME:-"${SPARK_BUILTIN}"}"
96104

97105
# Print essential environment variables to console
@@ -105,6 +113,8 @@ if [ $silent -eq 0 ]; then
105113
echo "KYUUBI_PID_DIR: ${KYUUBI_PID_DIR}"
106114
echo "KYUUBI_WORK_DIR_ROOT: ${KYUUBI_WORK_DIR_ROOT}"
107115

116+
echo "FLINK_HOME: ${FLINK_HOME}"
117+
108118
echo "SPARK_HOME: ${SPARK_HOME}"
109119
echo "SPARK_CONF_DIR: ${SPARK_CONF_DIR:-"${SPARK_HOME}/conf"}"
110120

build/dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ mkdir -p "$DISTDIR/beeline-jars"
198198
echo "Kyuubi $VERSION $GITREVSTRING built for" > "$DISTDIR/RELEASE"
199199
echo "Java $JAVA_VERSION" >> "$DISTDIR/RELEASE"
200200
echo "Scala $SCALA_VERSION" >> "$DISTDIR/RELEASE"
201+
echo "Flink $FLINK_VERSION" >> "$DISTDIR/RELEASE"
201202
echo "Spark $SPARK_VERSION" >> "$DISTDIR/RELEASE"
202203
echo "Spark Hadoop $SPARK_HADOOP_VERSION" >> "$DISTDIR/RELEASE"
203204
echo "Kyuubi Hadoop $HADOOP_VERSION" >> "$DISTDIR/RELEASE"

0 commit comments

Comments
 (0)