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 - rootwget -nv http://s3.amazonaws.com/dev.hortonworks.com/ HDP/centos6/2.x/BUILDS/<version>/hdpbn.repo -O /etc/ yum.repos.d/Spark<version>.repoyum install spark_<version>-master -yTo use Python:
yum install spark_<version>-pythonconf-select create-conf-dir --package spark --stack-version <version> --conf-version 0cp /etc/spark/<version>/0/* /etc/spark/<version>/0/conf-select set-conf-dir --package spark --stack-version <version> --conf-version 0hdp-select set spark-client <version>hdp-select set spark-historyserver <version>
Validate the Spark installation. As user spark, run SparkPI example:
sudo su sparkcd /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

