Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
systemsmanagement:Ardana:8:CentOS:7.3
spark
fix-spark-home-and-conf.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-spark-home-and-conf.patch of Package spark
Index: src/spark-1.6.3/bin/load-spark-env.sh =================================================================== --- src/spark-1.6.3.orig/bin/load-spark-env.sh +++ src/spark-1.6.3/bin/load-spark-env.sh @@ -23,7 +23,11 @@ # Figure out where Spark is installed if [ -z "${SPARK_HOME}" ]; then - export SPARK_HOME="$(cd "`dirname "$0"`"/..; pwd)" + export SPARK_HOME=/usr/share/spark/ +fi + +if [ -z "${SPARK_CONF_DIR}" ]; then + export SPARK_CONF_DIR=/etc/spark/ fi if [ -z "$SPARK_ENV_LOADED" ]; then @@ -40,6 +44,13 @@ if [ -z "$SPARK_ENV_LOADED" ]; then . "${user_conf_dir}/spark-env.sh" set +a fi + + if [ -f "${user_conf_dir}/spark-env" ]; then + # Promote all variable declarations to environment (exported) variables + set -a + . "${user_conf_dir}/spark-env" + set +a + fi fi # Setting SPARK_SCALA_VERSION if not already set. Index: src/spark-1.6.3/bin/spark-class =================================================================== --- src/spark-1.6.3.orig/bin/spark-class +++ src/spark-1.6.3/bin/spark-class @@ -18,7 +18,11 @@ # if [ -z "${SPARK_HOME}" ]; then - export SPARK_HOME="$(cd "`dirname "$0"`"/..; pwd)" + export SPARK_HOME=/usr/share/spark/ +fi + +if [ -z "${SPARK_CONF_DIR}" ]; then + export SPARK_CONF_DIR=/etc/spark/ fi . "${SPARK_HOME}"/bin/load-spark-env.sh Index: src/spark-1.6.3/bin/spark-sql =================================================================== --- src/spark-1.6.3.orig/bin/spark-sql +++ src/spark-1.6.3/bin/spark-sql @@ -18,7 +18,11 @@ # if [ -z "${SPARK_HOME}" ]; then - export SPARK_HOME="$(cd "`dirname "$0"`"/..; pwd)" + export SPARK_HOME=/usr/share/spark/ +fi + +if [ -z "${SPARK_CONF_DIR}" ]; then + export SPARK_CONF_DIR=/etc/spark/ fi export _SPARK_CMD_USAGE="Usage: ./bin/spark-sql [options] [cli option]" Index: src/spark-1.6.3/bin/spark-submit =================================================================== --- src/spark-1.6.3.orig/bin/spark-submit +++ src/spark-1.6.3/bin/spark-submit @@ -18,7 +18,11 @@ # if [ -z "${SPARK_HOME}" ]; then - export SPARK_HOME="$(cd "`dirname "$0"`"/..; pwd)" + export SPARK_HOME=/usr/share/spark/ +fi + +if [ -z "${SPARK_CONF_DIR}" ]; then + export SPARK_CONF_DIR=/etc/spark/ fi # disable randomized hash for string in Python 3.3+ Index: src/spark-1.6.3/bin/spark-shell =================================================================== --- src/spark-1.6.3.orig/bin/spark-shell +++ src/spark-1.6.3/bin/spark-shell @@ -29,7 +29,11 @@ esac set -o posix if [ -z "${SPARK_HOME}" ]; then - export SPARK_HOME="$(cd "`dirname "$0"`"/..; pwd)" + export SPARK_HOME=/usr/share/spark/ +fi + +if [ -z "${SPARK_CONF_DIR}" ]; then + export SPARK_CONF_DIR=/etc/spark/ fi export _SPARK_CMD_USAGE="Usage: ./bin/spark-shell [options]"
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor