Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Setup SPARK_HOME variable?

Following the steps of Sparkling Water from the link http://h2o-release.s3.amazonaws.com/sparkling-water/rel-2.2/0/index.html.

Running in terminal :

~/InstallFile/SparklingWater/sparkling-water-2.2.0$ bin/sparkling-shell --conf "spark.executor.memory=1g"

Please setup SPARK_HOME variable to your Spark installation

like image 736
roshan_ray Avatar asked Oct 06 '17 20:10

roshan_ray


People also ask

What should be SPARK_HOME?

The SPARK_HOME variable is the directory/folder where sparkling water will find the spark run time.

How do I set environment variables in spark?

Spark Configuration Spark properties control most application parameters and can be set by using a SparkConf object, or through Java system properties. Environment variables can be used to set per-machine settings, such as the IP address, through the conf/spark-env.sh script on each node.

How do I set environment variables in Pyspark?

Before starting PySpark, you need to set the following environments to set the Spark path and the Py4j path. Or, to set the above environments globally, put them in the . bashrc file. Then run the following command for the environments to work.

How do I set a spark path?

Enter the path to the Spark folder C:\Spark\spark-2.4. 5-bin-hadoop2. 7\bin. We recommend using %SPARK_HOME%\bin to avoid possible issues with the path.


1 Answers

You should install and set the SPARK_HOME variable, in unix terminal run the following code to set the variable:

export SPARK_HOME="/path/to/spark"

To maintain this config you should append this to the end of your .bashrc.

See this for installation https://www.tutorialspoint.com/apache_spark/apache_spark_installation.htm

like image 51
Jader Martins Avatar answered Oct 15 '22 08:10

Jader Martins