Configuring and Upgrading Apache Spark
Add the node where you want Apache Spark 1.4.1 History Server to run. Install the version corresponding to the HDP version you currently have installed.
su - root
wget -nv http://s3.amazonaws.com/dev.hortonworks.com/ HDP/centos6/2.x/BUILDS/<version>/hdpbn.repo -O /etc/ yum.repos.d/Spark<version>.repo
yum install spark_<version>-master -y
To use Python:
yum install spark_<version>-python
conf-select create-conf-dir --package spark --stack-version <version> --conf-version 0
cp /etc/spark/<version>/0/* /etc/spark/<version>/0/
conf-select set-conf-dir --package spark --stack-version <version> --conf-version 0
hdp-select set spark-client <version>
hdp-select set spark-historyserver <version>
Validate the Spark installation. As user spark, run SparkPI example:
sudo su spark
cd /usr/hdp/current/spark-client
./bin/run-example SparkPi 10
Restart Spark on YARN in either yarn-cluster mode or yarn-client mode:
yarn-cluster mode:
./usr/hdp/current/spark-client/bin/spark-submit --class path.to.your.Class --master yarn-cluster [options] [app options]
yarn-client mode:
./usr/hdp/current/spark-client/bin/spark-shell -- master yarn-client