您好,登錄后才能下訂單哦!
使用 安裝包:
scala-2.10.3.tgz
spark-0.9.0-incubating-bin-hadoop2.tgz
hadoop-2.3.0-cdh6.0.0.tar.gz
jdk1.7.0_45
下載地址:http://mirror.bit.edu.cn/apache/spark/spark-0.9.0-incubating/
spark-0.9.0-incubating-bin-hadoop2.tgz
http://archive.cloudera.com/cdh6/cdh/5/下載 sacala和hadoop
安裝軟件
tar
zxvf
spark-0.9.0-incubating-bin-hadoop2.tgz
tar
zxvf
scala-2.10.3.tgz
配置用戶環境變量~/.bashrc
export JAVA_HOME=/hadoop/jdk1.7.0_45
export HADOOP_HOME=/hadoop/hadoop
export HADOOP_CONF_DIR=/hadoop/hadoop-config
export PATH=$JAVA_HOME/bin:$HADOOP_HOME/bin:$HADOOP_HOME/sbin:$SCALA_HOME/bin:$SPARK_HOME/bin:$PATH
export CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$CLASSPATH
export HADOOP_HOME_WARN_SUPPRESS=1
export SCALA_HOME=/hadoop/scala-2.10.3
export SPARK_EXAMPLES_JAR=/hadoop/spark/examples/target/spark-examples_2.10-0.9.0-incubating.jar
export SPARK_HOME=/hadoop/spark-0.9.0-incubating-bin-hadoop2
配置環境變量: /hadoop/spark-0.9.0-incubating-bin-hadoop2/conf下
修改spark-env.sh文件,加入spark必要的配置:
export SCALA_HOME=/hadoop/scala-2.10.3
export JAVA_HOME=/hadoop/jdk1.7.0_45
export SPARK_HOME=/hadoop/spark
拷貝環境變量到其他節點,立即 生效 source .bash_profile
測試環境變量 scala -version
配置conf文件:
vi slaves
bigdata-2
bigdata-4
文件分發至其他節點
spark啟動:
cd /hadoop/spark-0.9.0-incubating-bin-hadoop2/sbin
./start-all.sh
查看進程:
jps
22580 NameNode
25767 Master
27758 Jps
23024 ResourceManager
22812 SecondaryNameNode
節點進程:
70869 Worker
70150 NodeManager
71462 Jps
70023 DataNode
~安裝完畢~安裝完畢~安裝完畢~安裝完畢~安裝完畢~
spark使用:
ll /hadoop/spark/bin
-rw-rw-r--. 1 hadoop hadoop 2601 2月 3 03:13 compute-classpath.cmd
-rwxrwxr-x. 1 hadoop hadoop 3330 2月 3 03:13 compute-classpath.sh
-rwxrwxr-x. 1 hadoop hadoop 2070 2月 3 03:13 pyspark
-rw-rw-r--. 1 hadoop hadoop 1827 2月 3 03:13 pyspark2.cmd
-rw-rw-r--. 1 hadoop hadoop 1000 2月 3 03:13 pyspark.cmd
-rwxrwxr-x. 1 hadoop hadoop 3055 2月 3 03:13 run-example
-rw-rw-r--. 1 hadoop hadoop 2047 2月 3 03:13 run-example2.cmd
-rw-rw-r--. 1 hadoop hadoop 1012 2月 3 03:13 run-example.cmd
-rwxrwxr-x. 1 hadoop hadoop 5151 2月 3 03:13 spark-class
-rwxrwxr-x. 1 hadoop hadoop 3212 2月 3 03:13 spark-class2.cmd
-rw-rw-r--. 1 hadoop hadoop 1010 2月 3 03:13 spark-class.cmd
-rwxrwxr-x. 1 hadoop hadoop 3038 2月 3 03:13 spark-shell
-rwxrwxr-x. 1 hadoop hadoop 941 2月 3 03:13 spark-shell.cmd
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。