-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add driver_host to spark config #2
Conversation
if [ -n "$SPARK_DRIVER_HOST" ]; then | ||
echo "Setting spark.driver.host to $SPARK_DRIVER_HOST" | ||
source /opt/bitnami/scripts/spark-env.sh | ||
if [ -z "$SPARK_CONF_FILE" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MrCreosote I think the previous attempt to write to the Spark config file failed because we didn't set $SPARK_CONF_FILE
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work in the CI or CDM stack?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea. I already deployed the new image in the CDM namespace and tested it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -2,6 +2,16 @@ | |||
|
|||
echo "starting jupyter notebook" | |||
|
|||
if [ -n "$SPARK_DRIVER_HOST" ]; then | |||
echo "Setting spark.driver.host to $SPARK_DRIVER_HOST" | |||
source /opt/bitnami/scripts/spark-env.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to get the conf file env var?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea. I think this is the script bitnami is using to load all env variables. It only has export
commands.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
conf = SparkConf(). \ | ||
setMaster( os.environ['SPARK_MASTER_URL']). \ | ||
setAppName("TestSparkJob"). \ | ||
set("spark.driver.host", os.environ['SPARK_DRIVER_HOST']) | ||
setAppName("TestSparkJob") | ||
sc = SparkContext(conf=conf) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much easier for the user
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup
No description provided.