Skip to content

Commit 0489250

Browse files
turboFeipan3793
authored andcommitted
[KYUUBI #1424] Share jars between server and beeline to reduce binary size
<!-- 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. --> Share jars between server and beeline to reduce binary size. ### _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 - [x] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #1424 from turboFei/share. Closes #1424 8147a94 [fwang12] use relative path 238df24 [fwang12] refactor e7069e0 [fwang12] share jars between server and cli Authored-by: fwang12 <fwang12@ebay.com> Signed-off-by: Cheng Pan <chengpan@apache.org>
1 parent 116369a commit 0489250

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

build/dist

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,16 @@ cp -r "$KYUUBI_HOME/kyuubi-assembly/target/scala-$SCALA_VERSION/jars/" "$DISTDIR
192192
# Copy kyuubi beeline jars
193193
cp "$KYUUBI_HOME"/kyuubi-hive-beeline/target/*.jar "$DISTDIR/beeline-jars/"
194194

195+
# Share the jars between server and beeline to reduce binary size
196+
cd $DISTDIR/beeline-jars
197+
for jar in $(ls "$DISTDIR/jars/"); do
198+
if [[ -f "$DISTDIR/beeline-jars/$jar" ]]; then
199+
rm "$DISTDIR/beeline-jars/$jar"
200+
ln -sn "../jars/$jar" "$DISTDIR/beeline-jars/$jar"
201+
fi
202+
done
203+
cd -
204+
195205
# Copy spark engines
196206
cp "$KYUUBI_HOME/externals/kyuubi-spark-sql-engine/target/kyuubi-spark-sql-engine_${SCALA_VERSION}-${VERSION}.jar" "$DISTDIR/externals/engines/spark"
197207

0 commit comments

Comments
 (0)