spark单机模式

1、下载spark,解压
2、复制conf/spark-env.sh和conf/log4j.properties

cp spark-env.sh.template spark-env.sh
cp log4j.properties.template log4j.properties

3、编辑spark-env.sh,设置SPARK_LOCAL_IP,docker-1为主机名,对应IP为10.10.20.204

export SPARK_LOCAL_IP=docker-1

4、运行example,执行如下命令

bin/run-example org.apache.spark.examples.SparkPi

5、启动shell

bin/spark-shell

6、访问ui,http://10.10.20.204:4040

 

posted @ 2016-10-25 17:26  puroc  阅读(589)  评论(0编辑  收藏  举报