This page describes configuring Spark metrics in CM to enable JMX monitoring and Graphite reporting for Spark and Spark2 clients.
Steps for Configuration
- In the CM UI, navigate to Service > Configuration tab.
- In the search bar, type the below and update the following parameters with values.
- Spark Client Advanced Configuration Snippet (Safety Valve) → maps to spark-conf/spark-defaults.conf.
- Spark2 Client Advanced Configuration Snippet (Safety Valve) → maps to spark2-conf/spark-defaults.conf.
spark.metrics.conf.*.sink.graphite.class=org.apache.spark.metrics.sink.GraphiteSinkspark.metrics.conf.*.sink.graphite.host=localhostspark.metrics.conf.*.sink.graphite.port=12003spark.metrics.conf.*.sink.graphite.protocol=tcpspark.metrics.conf.*.sink.graphite.prefix=spark.metricsspark.metrics.conf.*.sink.graphite.period=20spark.metrics.conf.*.source.jvm.class=org.apache.spark.metrics.source.JvmSourceFor details on configuring other details for Spark, see Additional Notes.
Result
Spark jobs will send JVM and application metrics to Graphite, enabling Pulse to collect, visualize, and analyze Spark performance.
Was this page helpful?