SPARK_EXAMPLES_JAR=/home/jay/spark-0.7.2/examples/target/scala-2.9.3/spark-exam ples_2.9.3-0.7.2.jar
#save and exit vim
#make the bash profile take effect immediately
$source/etc/profile
在in conf/spark-env.sh中设置SCALA_HOME
$cd~/spark-0.7.2/conf
$mv plate spark-env.sh
$vim spark-env.shhadoop与spark的区别与联系
#add the following line
export SCALA_HOME=/usr/lib/scala-2.9.3
#save and exit
在conf/slaves,添加Spark worker的hostname,一行一个。
$vim slaves
slave01
slave02
#save and exit
(可选)设置SPARK_HOME环境变量,并将SPARK_HOME/bin加入PATH
$gedit/etc/profile
#add the following lines at the end
export SPARK_HOME=/home/jay/spark-0.7.2
export PATH=$PATH:$SPARK_HOME/bin
#save and exit vim
#make the bash profile take effect immediately
$source/etc/profile
5.4在所有worker上安装并配置Spark
既然master上的这个文件件已经配置好了,把它拷贝到所有的worker。注意,三台机器spark所在目录必须一致,因为master会登陆到worker上执行命令,master认为worker的spark路径与自己一样。

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。