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

Conversation

@kimoonkim
Copy link
Member

Supports extra JVM options to pass to the driver command line. spark.driver.extraJavaOptions is an existing config key (documented here) and commonly used to pass additional JVM GC settings, etc.

@ash211
Copy link

ash211 commented Jan 25, 2017

This looks good @kimoonkim ! Out of curiosity, what flags are you needing to put on the driver JVM?

@mccheah
Copy link

mccheah commented Jan 25, 2017

Thanks for submitting this - also looks fine to me!

@ssuchter
Copy link
Member

ssuchter commented Jan 25, 2017 via email

@mccheah
Copy link

mccheah commented Jan 25, 2017

I think spark.driver.memory is the canonical configuration for setting driver memory, and we do respect this in KubernetesSparkRestServer. But there's other more obscure things like GC settings that are worth overriding.

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.

Let's merge when tests complete

@kimoonkim
Copy link
Member Author

Thanks for the reviews!

@ash211 I was playing with -javaagent JVM option, to insert a JMX-based Spark metrics sync that can expose the driver metrics to prometheus. The idea is well described in this blog.

Note there is also a similar option for executors. I was hoping to explore that as well, but it seems the current code for launching executor pods does not manipulate the command line at runtime. So maybe next time :-)

@lins05
Copy link

lins05 commented Jan 26, 2017

+1 for this. I was thinking of how to attach a intellij debugger to the driver code, now i can make use of the extra driver java options.

@ash211 ash211 merged commit 2f0eb4b into apache-spark-on-k8s:k8s-support-alternate-incremental Jan 26, 2017
@lins05
Copy link

lins05 commented Jan 26, 2017

Well done. I have successfully made the spark driver process attach to my intellij debug server, with something like this:

 --conf spark.driver.extraJavaOptions=-agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=myhost:5005

@kimoonkim kimoonkim deleted the support-driver-extra-java-opts branch January 26, 2017 17:04
ash211 pushed a commit that referenced this pull request Feb 8, 2017
ash211 pushed a commit that referenced this pull request Mar 8, 2017
foxish pushed a commit that referenced this pull request Jul 24, 2017
ifilonenko pushed a commit to ifilonenko/spark that referenced this pull request Feb 25, 2019
puneetloya pushed a commit to puneetloya/spark that referenced this pull request Mar 11, 2019
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.

5 participants