一、安装JDK、Scala
略。
二、安装zookeeper
略。
三、安装Hadoop
四、安装Spark
1、修改spark/conf/spark-env.sh
export JAVA_HOME=/usr/java/jdk1.8.0_65
export SCALA_HOME=/usr/scala-2.11.8
export HADOOP_HOME=/usr/hadoop-2.7.2
export HADOOP_CONF_DIR=/usr/hadoop-2.7.2/etc/hadoop
export SPARK_MASTER_IP=node1
export SPARK_DAEMON_JAVA_OPTS="-Dspark.deploy.recoveryMode=ZOOKEEPER -Dspark.deploy.zookeeper.url=node1:2181,node2:2181,node3:2181 -Dspark.deploy.zookeeper.dir=/spark"
export SPARK_WORKER_MEMORY=1g
export SPARK_EXECUTOR_MEMORY=1g
export SPARK_DRIVER_MEMORY=1G
export SPARK_WORKER_CORES=2
2、修改 spark/conf/slaves
node2
node3
node4
3、修改 spark/conf/spark-defaults.conf
spark.executor.extraJavaOptions -XX:+PrintGCDetails -Dkey=value -Dnumbers="one two three"
spark.eventLog.enabled true
spark.eventLog.dir hdfs://mycluster/historyServerforSpark
spark.yarn.historyServer.address node1:18080
spark.history.fs.logDirectory hdfs://mycluster/historyServerforSpark
4、需要到hdfs 系统上创建/historyServerforSpark目录
5、复制到各个机器上
6、启动spark集群和启动history-serve
./start-all.sh
./start-history-server.sh
PS:其他机器的master需要在其他机器运行./start-master.sh
博文地址:http://julyme.com/c/Spark的HA部署
个人博客地址:http://julyme.com
转载请注明出处: http://www.julyme.com/20161209/25.html
打赏一个呗~~(微信)
Julyme
感觉还行吧。
Julyme的IT技术分享