Optional: Spark Manual Upgrade Procedure
![]() | Important |
|---|---|
Hortonworks strongly recommends that all users running HDP 2.3.4 upgrade to HDP 2.3.4.7. |
(Optional) Upgrade Spark from 1.4.1 to 1.5.2. As root:
Stop Spark 1.4.1:
su - spark -c "/usr/hdp/current/spark-client/sbin/stop-history-server.sh".Remove Spark 1.4.1:
yum erase "spark*".Add the node where you want Spark 1.5.2 History Server to run:
su - rootwget -nv http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.3.4.0-3485/hdpbn.repo -O /etc/yum.repos.d/Spark141TP.repoyum install spark_2_3_4_0_3485-master -yTo use Python:
yum install spark_2_3_4_0_3485-pythonconf-select create-conf-dir --package spark --stack-version 2.3.4.0-3485 --conf-version 0cp /etc/spark/2.3.4.0-3485/0/* /etc/spark/2.3.4.0-3485/0/conf-select set-conf-dir --package spark --stack-version 2.3.4.0-3485 --conf-version 0hdp-select set spark-client 2.3.4.0-3485hdp-select set spark-historyserver 2.3.4.0-3485
Validate the Spark installation. As user spark, run SparkPI example:
su - spark -c "cd /usr/hdp/current/spark-client"./bin/spark-submit --class org.apache.spark.examples.SparkPi --master yarn-client --num-executors 3 --driver-memory 512m --executor-memory 512m --executor-cores 1 lib/spark-examples*.jar 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 jar> [app options]yarn-client mode:
./usr/hdp/current/spark-client/bin/spark-shell --master yarn-client


![[Important]](../common/images/admon/important.png)