https://www.cnblogs.com/qingyunzong/p/8888080.html
[root@mhc-linux sbin]# cat ../conf/spark-env.sh
#!/usr/bin/env bash
export JAVA_HOME=/language/jdk1.8.0_181
#export SCALA_HOME=/usr/share/scala
export HADOOP_HOME=/usr/local/hadoop/hadoop-2.7.7
export HADOOP_CONF_DIR=/usr/local/hadoop/hadoop-2.7.7/etc/hadoop
export SPARK_WORKER_MEMORY=500m
export SPARK_WORKER_CORES=1
export SPARK_DAEMON_JAVA_OPTS="-Dspark.deploy.recoveryMode=ZOOKEEPER -Dspark.deploy.zookeeper.url=ali:2181 -Dspark.deploy.zookeeper.dir=/spark"
export SPARK_LOCAL_IP=127.0.0.1
export SPARK_MASTER_HOST=127.0.0.1