spark1.1.0windows安装报错解决方案

 

sparkwindows版本的安装:

 

 

 

spark1.1.0的安装会报一下的错误:

 

 

解决的方法是:

 

到该连接下,下载需要的文件,放到spark_homebin目录下:

 

https://github.com/srccodes/hadoop-common-2.2.0-bin

 

 

 

最后到sparkbin目录下执行:  spark-shell.cmd文件即可

 

 

 

 

 

 

 

 

 

spark0.8的安装:

 

1)下载spark-0.8.0-incubating.tgz

 

2)解压编译,完成时间如下:

 

 D:\\ Spark\\spark-0.8.0-incubating> sbt\\sbt.cmd  assembly
 ...
 [info] Done packaging.
 [info] Packaging C:\\Develop\\Source\\Spark\\spark-0.8.0-incubating\\examples\\target\\
 scala-2.9.3\\spark-examples-assembly-0.8.0-incubating.jar ...
 [info] Done packaging.
 [success] Total time: 1265 s, completed 2013/11/04 21:36:04

 

 

 

(3) Spark Shell的运行

 

如下启动Spark

 

D:\\Spark\\spark-0.8.0-incubating> spark-shell.cmd
Welcome to
____ __
/ __/__ ___ _____/ /__
_\\ \\/ _ \\/ _ `/ __/ \'_/
/___/ .__/\\_,_/_/ /_/\\_\\ version 0.8.0
/_/

 

...
INFO ui.SparkUI: Started Spark Web UI at http://haumea:4040
Spark context available as sc.
Type in expressions to have them evaluated.
Type :help for more information.

 

scala>

 

Web访问情况如下:

 

http://www.jdon.com/bigdata/simgs/sparkweb.jpg

 

操作Shell的命令如下:

 

scala> val textFile = sc.textFile(\"README.md\")
textFile: org.apache.spark.rdd.RDD[String] = MappedRDD[1] at textFile at <console>:12

 

scala> textFile.count()
res1: Long = 111

 

scala> textFile.first()
res2: String = # Apache Spark

 

scala> textFile.foreach(println(_))

 

上述命令运行后,结果在UI显示如下:

 

http://www.jdon.com/bigdata/simgs/sparkweb2.jpg

 

你可能感兴趣的:(scala,spark)