Install
su - spark # or spark service user
cd /var/tmp/share
curl --retry 3 -C - -O https://archive.apache.org/dist/spark/spark-2.3.3/spark-2.3.3-bin-hadoop2.7.tgz
mkdir -p /usr/local/apache-spark
tar -xf /var/tmp/share/spark-2.3.3-bin-hadoop2.7.tgz -C /usr/local/apache-spark/
Setup / Start
su - spark # or spark service user
alternatives --display java | grep currently
link currently points to /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-3.b13.el7_5.x86_64/jre/bin/java
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-3.b13.el7_5.x86_64/jre
/usr/local/apache-spark/spark-2.3.3-bin-hadoop2.7/sbin/start-thriftserver.sh --hiveconf hive.metastore.warehouse.dir=/user/hive/warehouse --hiveconf hive.server2.thrift.port=10000 --executor-memory 2g
starting org.apache.spark.sql.hive.thriftserver.HiveThriftServer2, logging to /usr/local/apache-spark/spark-2.3.3-bin-hadoop2.7/logs/spark-atscale-org.apache.spark.sql.hive.thriftserver.HiveThriftServer2-1-spark.standalone.localdomain.out
TEST:
/usr/local/apache-spark/spark-2.3.3-bin-hadoop2.7/bin/beeline -u "jdbc:hive2://localhost:10000/" -e "CREATE DATABASE IF NOT EXISTS default;SHOW DATABASES;"
NOTE:
To specify an existing derby metastore location:
--hiveconf javax.jdo.option.ConnectionURL=jdbc:derby:/usr/local/apache-spark/metastore_db