Why does spark-submit and spark-shell fail with “Failed to find Spark assembly JAR. You need to build Spark before running this program.”?

前端 未结 9 1673
一个人的身影
一个人的身影 2020-12-17 07:33

I was trying to run spark-submit and I get \"Failed to find Spark assembly JAR. You need to build Spark before running this program.\" When I try to run spark-shell

9条回答
  •  时光说笑
    2020-12-17 08:24

    Spark Installation:

    For Window machine:

    Download spark-2.1.1-bin-hadoop2.7.tgz from this site https://spark.apache.org/downloads.html
    
    Unzip and Paste your spark folder in C:\ drive and set environment variable.
    
    If you don’t have Hadoop,
    you need to create Hadoop folder and also create Bin folder in it and then copy and paste winutils.exe file in it.
    
    download winutils file from [https://codeload.github.com/gvreddy1210/64bit/zip/master][1] 
    
    and paste winutils.exe file in Hadoop\bin folder and set environment variable for c:\hadoop\bin;
    
    create temp\hive folder in C:\ drive and give the full permission to this folder like: 
    
    C:\Windows\system32>C:\hadoop\bin\winutils.exe chmod 777 /tmp/hive
    
    open command prompt first run C:\hadoop\bin> winutils.exe  and then navigate to C:\spark\bin>
    
    run spark-shell
    
    

提交回复
热议问题