spark in eclipse---Spark学习笔记3

想要调试源代码,还是要放到eclipse里面去。先生成eclipse项目,下载依赖包

victor@victor-ubuntu:~/software/incubator-spark-0.8.1-incubating$ mvn eclipse:eclipse
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] Spark Project Parent POM
[INFO] Spark Project Core
[INFO] Spark Project Bagel
[INFO] Spark Project Streaming
[INFO] Spark Project ML Library
[INFO] Spark Project Examples
[INFO] Spark Project Tools
[INFO] Spark Project REPL
[INFO] Spark Project Assembly



[INFO] 
[INFO] --- maven-enforcer-plugin:1.1.1:enforce (enforce-versions) @ spark-assembly_2.9.3 ---
[INFO] 
[INFO] --- build-helper-maven-plugin:1.7:add-source (add-scala-sources) @ spark-assembly_2.9.3 ---
[INFO] Source directory: /home/victor/software/incubator-spark-0.8.1-incubating/assembly/src/main/scala added.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.4:process (default) @ spark-assembly_2.9.3 ---
[INFO] 
[INFO] <<< maven-eclipse-plugin:2.9:eclipse (default-cli) @ spark-assembly_2.9.3 <<<
[INFO] 
[INFO] --- maven-eclipse-plugin:2.9:eclipse (default-cli) @ spark-assembly_2.9.3 ---
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER
[INFO] Wrote settings to /home/victor/software/incubator-spark-0.8.1-incubating/assembly/.settings/org.eclipse.jdt.core.prefs
[INFO] Wrote Eclipse project for "spark-assembly_2.9.3" to /home/victor/software/incubator-spark-0.8.1-incubating/assembly.
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Spark Project Parent POM .......................... SUCCESS [1:39.289s]
[INFO] Spark Project Core ................................ SUCCESS [17:19.163s]
[INFO] Spark Project Bagel ............................... SUCCESS [2:20.763s]
[INFO] Spark Project Streaming ........................... SUCCESS [4:54.565s]
[INFO] Spark Project ML Library .......................... SUCCESS [1.011s]
[INFO] Spark Project Examples ............................ SUCCESS [15:55.830s]
[INFO] Spark Project Tools ............................... SUCCESS [0.889s]
[INFO] Spark Project REPL ................................ SUCCESS [7.436s]
[INFO] Spark Project Assembly ............................ SUCCESS [5.107s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 45:36.823s
[INFO] Finished at: Sat Mar 29 00:29:46 CST 2014
[INFO] Final Memory: 30M/202M
[INFO] ------------------------------------------------------------------------

生成成功。

导入eclipse。 New->Scala Project->路径输入/home/victor/software/incubator-spark-0.8.1-incubating

这个错误是编译器的问题,修改下scala配置
Window->Preference->Scala Compiler->Build Manager 

如图:



把勾取消掉, withVersionClassPathValidator 

再加入build classpath,  Add Libary ->  scala  Libary.

至此导入eclipse成功,并且能用快捷键来察看代码,跳转定义。




好了,先写到这把,我看网上资料挺少的,还不如自己研究。

下回我会写一下为什么前面 那个计算Pi的运行shell要那样写。

good night!

敬请期待。



评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值