Spark Standalone spark-env.sh
export JAVA_HOME=/app/jdk
export SPARK_MASTER_PORT=7077
export SPARK_MASTER_WEBUI_PORT=8080
export SPARK_WORKER_CORES=50
export SPARK_WORKER_OPTS="
-Dspark.worker.cleanup.enabled=true
-Dspark.worker.cleanup.interval=1800
-Dspark.worker.cleanup.appDataTtl=604800"
export SPARK_EXECUTOR_INSTANCES=1
export SPARK_WORKER_MEMORY=100g
export HADOOP_HOME=/app/hadoop
export HADOOP_CONF_DIR=/app/hadoop/etc/hadoop
export SPARK_DAEMON_MEMORY=10G
export SPARK_DAEMON_JAVA_OPTS="-Dspark.deploy.recoveryMode=ZOOKEEPER -Dspark.deploy.zookeeper.url=VECS01459:2181,VECS01458:2181,VECS01457:2181,VECS01456:2181,VECS01455:2181 -Dspark.d
eploy.zookeeper.dir=/spark"
export SPARK_DAEMON_JAVA_OPTS="\(SPARK_DAEMON_JAVA_OPTS -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+G1SummarizeConcMark -XX:MaxGCPauseMillis=150
-XX:-ResizePLAB -XX:+ParallelRefProcEnabled -XX:+AlwaysPreTouch -XX:ParallelGCThreads=24 -XX:ConcGCThreads=16 -XX:G1HeapWastePercent=3 -XX:InitiatingHeapOccupancyPercent=35 -XX:G1Mi
xedGCLiveThresholdPercent=85 -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintAdaptiveSizePolicy"
export JAVA_LIBRARY_PATH=\)JAVA_LIBRARY_PATH:\(HADOOP_HOME/lib/native
export LD_LIBRARY_PATH=\)LD_LIBRARY_PATH:\(HADOOP_HOME/lib/native
export SPARK_LIBRARY_PATH=\)SPARK_LIBRARY_PATH:\(HADOOP_HOME/lib/native
export SPARK_CLASSPATH=\)SPARK_CLASSPATH:$HADOOP_HOME/lib/*
Generic options for the daemons used in the standalone deploy mode
export SPARK_CONF_DIR=\({SPARK_HOME}/conf
export SPARK_LOG_DIR=\){SPARK_HOME}/logs
export SPARK_PID_DIR=\({SPARK_HOME}/tmp
export SPARK_LOCAL_DIRS=/data1/data/spark/local
export SPARK_IDENT_STRING=\)USER
Spark Standalone 集群调优后的环境变量。