更多代码请见:https://github.com/xubo245/SparkLearning
版本:Spark-2.0.0
1解释
从【2】中下载release版,idea打开mvn package,报错
遇到的问题:
main:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Spark Project Parent POM ........................... SUCCESS [ 6.694 s]
[INFO] Spark Project Tags ................................. SUCCESS [ 8.450 s]
[INFO] Spark Project Sketch ............................... SUCCESS [ 15.953 s]
[INFO] Spark Project Networking ........................... SUCCESS [ 48.225 s]
[INFO] Spark Project Shuffle Streaming Service ............ SUCCESS [ 14.020 s]
[INFO] Spark Project Unsafe ............................... SUCCESS [ 19.038 s]
[INFO] Spark Project Launcher ............................. SUCCESS [ 13.924 s]
[INFO] Spark Project Core ................................. FAILURE [ 4.655 s]
[INFO] Spark Project GraphX ............................... SKIPPED
[INFO] Spark Project Streaming ............................ SKIPPED
[INFO] Spark Project Catalyst ............................. SKIPPED
[INFO] Spark Project SQL .................................. SKIPPED
[INFO] Spark Project ML Local Library ..................... SKIPPED
[INFO] Spark Project ML Library ........................... SKIPPED
[INFO] Spark Project Tools ................................ SKIPPED
[INFO] Spark Project Hive ................................. SKIPPED
[INFO] Spark Project REPL ................................. SKIPPED
[INFO] Spark Project Assembly ............................. SKIPPED
[INFO] Spark Project External Flume Sink .................. SKIPPED
[INFO] Spark Project External Flume ....................... SKIPPED
[INFO] Spark Project External Flume Assembly .............. SKIPPED
[INFO] Spark Integration for Kafka 0.8 .................... SKIPPED
[INFO] Spark Project Examples ............................. SKIPPED
[INFO] Spark Project External Kafka Assembly .............. SKIPPED
[INFO] Spark Integration for Kafka 0.10 ................... SKIPPED
[INFO] Spark Integration for Kafka 0.10 Assembly .......... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:11 min
[INFO] Finished at: 2016-07-30T14:21:00+08:00
[INFO] Final Memory: 53M/450M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (default) on project spark-core_2.11: An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "bash" (in directory "C:\soft\spark\spark-2.0.0\core"): CreateProcess error=2, ϵͳÕҲ»µ½ָ¶
[ERROR] around Ant part ...<exec executable="bash">... @ 4:27 in C:\soft\spark\spark-2.0.0\core\target\antrun\build-main.xml
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :spark-core_2.11
2.代码:
解决办法:
将Git下面的bin路径加入系统Path中:C:\Program Files (x86)\Git\bin
3.结果:
验证,可以通过cmd查看git 和bash
参考
【1】http://spark.apache.org/docs/2.0.0/
【2】https://github.com/apache/spark
【3】https://github.com/xubo245/SparkLearning