Skip to content
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

Prometheus Metrics for Spark Driver with Single Env var #280

Open
zak-hassan opened this issue Feb 25, 2019 · 5 comments
Open

Prometheus Metrics for Spark Driver with Single Env var #280

zak-hassan opened this issue Feb 25, 2019 · 5 comments

Comments

@zak-hassan
Copy link
Member

Background

We currently have an environment variable when set to --metrics='prometheus' then the spark master and driver are instrumented. However we may be missing out on some good metrics coming out of the running driver application.

Proposal

Why don't we include the agent-bond.jar and the agent-config.yaml into the s2i images and when the same environment variable is set: --metrics=='prometheus' then lets have s2i automatically setup the java-agent to instrument the application.

Details:

The driver would need to passed in the following as spark options:

SPARK_MASTER_URL= # spark://10.230.8.242:7077

spark-submit --driver-java-options "-javaagent:/opt/spark-2.4.0-bin-hadoop2.7/metrics/agent-bond.jar=/opt/spark-2.4.0-bin-hadoop2.7/conf/agent-d.properties"  --conf spark.driver.extraJavaOptions=-javaagent:/opt/spark-2.4.0-bin-hadoop2.7/metrics/agent-bond.jar=/opt/spark-2.4.0-bin-hadoop2.7/conf/agent-d.properties  --master    $SPARK_MASTER_URL examples/src/main/python/pi.py
@zak-hassan
Copy link
Member Author

@elmiko @tmckayus Let me know what you think?

@elmiko
Copy link
Contributor

elmiko commented Feb 25, 2019

my first thought is that this seems like a reasonable idea.

second thought, since this image is based on radanalyticsio/openshift-spark it should already have the jar file in it. this might be a simple matter of locating it and adding the necessary option to start the metrics on the command line like you suggest.

@zak-hassan
Copy link
Member Author

Thats really good. I think that PR with the metrics config just got merged. Did you get a chance to cut a new image for that? I'd like to test drive this.

@elmiko
Copy link
Contributor

elmiko commented Feb 25, 2019

the metrics config pr you posted did get merged into the master, but we have not cut a new release from that.

there is an autobuild that gets generated at quay.io/radanalyticsio/openshift-spark:master and quay.io/radanalyticsio/openshift-spark-py36:master for that repo, but it looks like the transitive dependencies (ie this repo) have not been rebuilt.

if you want to play around with metrics and see what you can do with the s2i you will need to generate a new s2i image locally.

hope that helps!

@zak-hassan
Copy link
Member Author

It's in there. Perfect. Thanks @elmiko

@zak-hassan zak-hassan changed the title Prometheus Metrics for Spark Driver Prometheus Metrics for Spark Driver with Single Env var Feb 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants