Apache Spark Installation on Windows

Step-1: Install Java 8 or Later

  1. Download Java 8 or later
  2. Set JAVA_HOME and PATH environment variables as below:
    • JAVA_HOME = C:\Program Files\Java\jdk1.8.0_201
    • PATH = %PATH%;%JAVA_HOME%

Step-2 : Apache Spark Installation on Windows

  1. Download Apache spark from:
  2. https://spark.apache.org/downloads.html
  3. After download, un-tar/unzip, then copy to
    • C:\apps\opt\spark-3.1.2-bin-hadoop2.7
  4. Set SPARK_HOME, HADOOP_HOME and PATH environment variables similar to below:
    • SPARK_HOME  = C:\apps\opt\spark-3.1.2-bin-hadoop2.7
    • HADOOP_HOME = C:\apps\opt\spark-3.1.2-bin-hadoop2.7
    • PATH=%PATH%;%SPARK_HOME%

Step-3 : Spark with winutils.exe on Windows

  1. To run Apache Spark on windows, you need winutils.exe
  2. Download and copy to  %SPARK_HOME%\bin folder 
    • C:\apps\opt\spark-3.1.2-bin-hadoop2.7\bin

Step-4 : Apache Spark shell

  1. Open Command Prompt
  2. Go to %SPARK_HOME%/bin folder
    • cd %SPARK_HOME%/bin  or,
    • cd C:\apps\opt\spark-3.1.2-bin-hadoop2.7\bin
  3. Type spark-shell command to run Apache Spark shell



Post a Comment

1 Comments

  1. I think you are giving spark training in Hyderabad, thanks to share valuable resources to install spark in windows. . . If you share in the form of video its really helpful
    Venu
    spark training in Hyderabad

    ReplyDelete