Skip to content
This repository was archived by the owner on Jan 9, 2020. It is now read-only.

Read classpath entries from SPARK_EXTRA_CLASSPATH on executors. #383

Merged
merged 1 commit into from
Jul 20, 2017

Conversation

mccheah
Copy link

@mccheah mccheah commented Jul 20, 2017

This makes executors consistent with the driver. Note that SPARK_EXTRA_CLASSPATH isn't set anywhere by Spark itself, but it's primarily meant to be set by images that inherit from the base driver/executor images.

This makes executors consistent with the driver. Note that
SPARK_EXTRA_CLASSPATH isn't set anywhere by Spark itself, but it's
primarily meant to be set by images that inherit from the base
driver/executor images.
Copy link

@ash211 ash211 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reduces an inconsistency between the driver and executor docker images. We're in the process of baking an entire application into the docker images, and roughly the way we're doing it is creating a new Dockerfile for both driver and executor, inheriting from the published Spark Dockerfiles, adding jars into a path on the image, and setting ENV SPARK_EXTRA_CLASSPATH on the images.

However there is an inconsistency between the driver and executor Dockerfiles -- driver uses SPARK_EXTRA_CLASSPATH whereas the executor uses SPARK_EXECUTOR_EXTRA_CLASSPATH.

To eliminate this inconsistency, without breaking compatibility for consumers currently relying on SPARK_EXECUTOR_EXTRA_CLASSPATH, here we add support for SPARK_EXTRA_CLASSPATH on the executor as well.

@ash211 ash211 merged commit b1c48f9 into branch-2.1-kubernetes Jul 20, 2017
@ash211 ash211 deleted the executor-extra-classpath-docker branch July 20, 2017 05:27
@kimoonkim
Copy link
Member

+1. I ran into this issue the other day when I put /etc/hadoop/conf in a custom docker images and wanted put the dir in the classpath. Thanks for fixing this!

@mccheah
Copy link
Author

mccheah commented Jul 20, 2017

SPARK_EXECUTOR_EXTRA_CLASSPATH isn't reliable anyways because the scheduler will force the environment variable to be set to whatever the user has specified as spark.executor.extraClassPath.

foxish pushed a commit that referenced this pull request Jul 24, 2017
This makes executors consistent with the driver. Note that
SPARK_EXTRA_CLASSPATH isn't set anywhere by Spark itself, but it's
primarily meant to be set by images that inherit from the base
driver/executor images.
ifilonenko pushed a commit to ifilonenko/spark that referenced this pull request Feb 26, 2019
Apply patches for SPARK-24531 to fix tests
puneetloya pushed a commit to puneetloya/spark that referenced this pull request Mar 11, 2019
…he-spark-on-k8s#383)

This makes executors consistent with the driver. Note that
SPARK_EXTRA_CLASSPATH isn't set anywhere by Spark itself, but it's
primarily meant to be set by images that inherit from the base
driver/executor images.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants