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 += ""