-
Notifications
You must be signed in to change notification settings - Fork 691
Windows下搭建Spark
Diwei Liu edited this page Jan 18, 2018
·
1 revision
-
scala: http://www.scala-lang.org/download/all.html (2.11.8)
-
spark: https://mirrors.tuna.tsinghua.edu.cn/apache/spark/spark-2.1.2/
-
Hadoop:https://mirrors.tuna.tsinghua.edu.cn/apache/hadoop/common/hadoop-2.7.4/
将程序解压,然后配置环境变量,将spark的bin目录配置到环境变量中;
-
将程序解压,然后配置环境变量HADOOP_HOME,将hadoop的bin目录配置到环境变量中;
-
https://github.com/steveloughran/winutils/tree/master/hadoop-2.7.1 下载hadoop.dll和winutils.exe到hadoop的bin目录,如果报错,则将hadoop.dll拷贝到C:/Windows/System32目录
-
启动hadoop
hadoop namenode -format
cd %HADOOP_HOME%\sbin
start-all.cmd
- jps查看启动结果
11072
8576 ResourceManager
10724 NameNode
14084
15780 SparkSubmit
16612 DataNode
3172
13228 Jps
14316 PluginMain
4156
在spark安装目录中的jar中找到scala的版本,然后到上面的下载地址中下载对应的版本,此处为2.11.8,最后将scala安装好即可,注意安装路径中不能包含空格。
使用spark-shell
命令即可启动spark。