From e0e45206cbe2fb10735ede69f68549cafd7fdaf9 Mon Sep 17 00:00:00 2001 From: fwang12 Date: Tue, 6 Jul 2021 13:20:02 +0800 Subject: [PATCH] [KYUUBI #695] Add doc for kyuubi.engineEnv.VAR_NAME usage ### _Why are the changes needed?_ Add doc for `kyuubi.engineEnv.VAR_NAME` usage. ### _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/tools/testing.html#running-tests) locally before make a pull request Closes #746 from turboFei/KYUUBI_695. Closes #695 f63e4367 [fwang12] adress comments facdec77 [fwang12] [KYUUBI #695] Add doc for kyuubi.engineEnv.VAR_NAME usage Authored-by: fwang12 Signed-off-by: Kent Yao --- docs/deployment/settings.md | 2 ++ .../org/apache/kyuubi/config/AllKyuubiConfiguration.scala | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/docs/deployment/settings.md b/docs/deployment/settings.md index d270f5ecd..2019cd383 100644 --- a/docs/deployment/settings.md +++ b/docs/deployment/settings.md @@ -66,6 +66,8 @@ You can configure the environment variables in `$KYUUBI_HOME/conf/kyuubi-env.sh` # export KYUUBI_JAVA_OPTS="-Xmx10g -XX:+UnlockDiagnosticVMOptions -XX:ParGCCardsPerStrideChunk=4096 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSConcurrentMTEnabled -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:+CMSParallelRemarkEnabled -XX:+UseCondCardMark -XX:MaxDirectMemorySize=1024m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./logs -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution -Xloggc:./logs/kyuubi-server-gc-%t.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=5M -XX:NewRatio=3 -XX:MetaspaceSize=512m" ``` +For the environment variables that only needed to be transferred into engine side, you can set it with a Kyuubi configuration item formatted `kyuubi.engineEnv.VAR_NAME`. For example, with `kyuubi.engineEnv.SPARK_DRIVER_MEMORY=4g`, the environment variable `SPARK_DRIVER_MEMORY` with value `4g` would be transferred into engine side. With `kyuubi.engineEnv.SPARK_CONF_DIR=/apache/confs/spark/conf`, the value of `SPARK_CONF_DIR` in engine side is set to `/apache/confs/spark/conf`. + ## Kyuubi Configurations You can configure the Kyuubi properties in `$KYUUBI_HOME/conf/kyuubi-defaults.conf`. For example: diff --git a/kyuubi-main/src/test/scala/org/apache/kyuubi/config/AllKyuubiConfiguration.scala b/kyuubi-main/src/test/scala/org/apache/kyuubi/config/AllKyuubiConfiguration.scala index 7281355f6..cb0227591 100644 --- a/kyuubi-main/src/test/scala/org/apache/kyuubi/config/AllKyuubiConfiguration.scala +++ b/kyuubi-main/src/test/scala/org/apache/kyuubi/config/AllKyuubiConfiguration.scala @@ -100,6 +100,14 @@ class AllKyuubiConfiguration extends KyuubiFunSuite { rewriteToConf(Paths.get(kyuubiHome, "conf", "kyuubi-env.sh.template"), newOutput) + newOutput += "" + newOutput += "For the environment variables that only needed to be transferred into engine" + + " side, you can set it with a Kyuubi configuration item formatted" + + " `kyuubi.engineEnv.VAR_NAME`. For example, with `kyuubi.engineEnv.SPARK_DRIVER_MEMORY=4g`," + + " the environment variable `SPARK_DRIVER_MEMORY` with value `4g` would be transferred into" + + " engine side. With `kyuubi.engineEnv.SPARK_CONF_DIR=/apache/confs/spark/conf`, the" + + " value of `SPARK_CONF_DIR` in engine side is set to `/apache/confs/spark/conf`." + newOutput += "" newOutput += "## Kyuubi Configurations" newOutput += ""