Spark2學習1之基本環境搭建(win)問題

KeepLearningBigData發表於2016-07-30

更多程式碼請見: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

相關文章