


:quit command exits you from scala script of spark-shell. Scala> verify the versions of Spark, Java and Scala displayed during the start of spark-shell. Type in expressions to have them evaluated. Using Scala version 2.11.8 (OpenJDK 64-Bit Server VM, Java 1.8.0_131) Spark context available as 'sc' (master = local, app id = local-1501798344680). We will go for Spark 3.0.1 with Hadoop 2.7 as it is the latest version at the time of writing this article. Now, you need to download the version of Spark you want form their website. using builtin-java classes where applicableġ7/08/04 03:42:23 WARN Utils: Your hostname, arjun-VPCEH26EN resolves to a loopback address: 127.0.1.1 using 192.168.1.100 instead (on interface wlp7s0)ġ7/08/04 03:42:23 WARN Utils: Set SPARK_LOCAL_IP if you need to bind to another addressġ7/08/04 03:42:36 WARN ObjectStore: Failed to get database global_temp, returning NoSuchObjectException The output prints the versions if the installation completed successfully for all packages. For SparkR, use setLogLevel(newLevel).ġ7/08/04 03:42:23 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform. To adjust logging level use sc.setLogLevel(newLevel). Using Sparks default log4j profile: org/apache/spark/log4j-defaults.properties Run the following command : ~$ spark-shell ~$ spark-shell To verify the installation, close the Terminal already opened, and open a new Terminal again. Now that we have installed everything required and setup the PATH, we shall verify if Apache Spark has been installed correctly. Latest Apache Spark is successfully installed in your Ubuntu 16. Step 2: Extract the Spark latest version tarball by directly right click on that tarball otherwise will use the. export JAVA_HOME=/usr/lib/jvm/default-java/jre Complete Installation of Spark on Ubuntu 16.04 steps with pictures: Step 1: Download the Spark tarball from Apache Spark mirror official website. We shall use nano editor here : $ sudo nano ~/.bashrcĪnd add following lines at the end of ~/.bashrc file. To set JAVA_HOME variable and add /usr/lib/spark/bin folder to PATH, open ~/.bashrc with any of the editor. As a prerequisite, JAVA_HOME variable should also be set. Now we need to set SPARK_HOME environment variable and add it to the PATH. Then we moved the spark named folder to /usr/lib/. In the following terminal commands, we copied the contents of the unzipped spark folder to a folder named spark.
#Install spark ubuntu 16.04 install
~$ tar xzvf spark-2.2.0-bin-hadoop2.7.tgz I tried to install Spark on my Ubuntu 16.04 Machine which is running on JAVA 9.0.1.
#Install spark ubuntu 16.04 zip
To unzip the download, open a terminal and run the tar command from the location of the zip file. Before setting up Apache Spark in the PC, unzip the file.
