前提:已解压spark&scala包改名后放于/usr/local/
cd /usr/local/spark/conf/
cp slaves.template slaves
vi slaves
把
localhost
改成
node02
node03
cp spark-env.sh template spark-env.sh
vi spark-env.sh
export JAVA_HOME=/usr/local/jdk
export SCALA_HOME=/usr/local/scala
export SPARK_MASTER_HOST=192.168.1.80
export SPARK_MASTER_PORT=7077
export SPARK_WORKER_CORES=1
export SPARK_WORKER_INSTANCES=1
export SAPRK_WORKER_MEMORY=700M
export SPARK_MASTER_WEBUI_PORT=8888
export HADOOP_CONF_DIR=/usr/local/hadoop/etc/hadoop
cd /usr/local/spark/sbin/
vi spark-config.sh
export JAVA_HOME=/usr/local/jdk
cd /usr/local/spark/sbin/
./start-all.sh
jps
cd /usr/local/spark/bin/
./spark-shell
去网页ping一下4040
192.168.1.80:4040
网页出来则成功!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)