Explore SparkMeasure usage modes
masterSparkMeasure can be used in several different ways depending on your environment and requirements:
- Interactive mode: Best for
spark-shell(Scala),PySpark(Python), orjupyter notebooksto collect and analyze metrics manually. - Batch and code instrumentation: Use the SparkMeasure API to instrument your code directly for collecting, saving, and analyzing metrics. This is ideal for performance testing pipelines.
- Flight Recorder mode: Collects metrics transparently without code changes. Metrics can be saved to a file (local or Hadoop-compliant) or written in near-real-time to sinks like InfluxDB, Apache Kafka, Prometheus Pushgateway, or via JMX Exporter.