在Windows上运行Spark程序

时间:2021-07-10 21:28:15

一、下载Saprk程序

https://d3kbcqa49mib13.cloudfront.net/spark-2.1.1-bin-hadoop2.7.tgz

解压到d:\spark-2.1.1-bin-hadoop2.7

 

二、下载winutil.exe

https://github.com/steveloughran/winutils/blob/master/hadoop-2.7.1/bin/winutils.exe

放到d:\spark-2.1.1-bin-hadoop2.7\bin目录下

 

三、设置环境变量

HADOOP_HOME=d:\spark-2.1.1-bin-hadoop2.7

PATH=%PATH%;%HADOOP_HOME%\bin

四、启动

以Administrator用户启动cmd命令窗口,执行命令:

spark-shell

即可启动spark交互窗口