This topic explains how to enable and disable live monitoring of Spark Streaming applications.
Note
Spark versions 1.6.x, 2.x, and 3.0.x are supported for spark streaming.
Unravel uses a StreamingProbe to perform the live monitoring. By default, the probe is not enabled because monitoring can generate a lot of data and potentially overload Unravel's ES.
The probe is controlled by spark.driver.extraJavaOptions which is defined in spark-defaults.conf
.
The Spark streaming probe is disabled by default and you must enable it manually by editing spark-defaults.conf
.
To enable the probe edit
spark-defaults.conf
and set the property as follows:spark.driver.extraJavaOptions=-javaagent:/opt/cloudera/parcels/UNRAVEL_SENSOR/lib/java/btrace-agent.jar=libs=spark-
<spark-version>
,script=StreamingProbe.btclass,config=driverSet spark.driver.extraJavaOptions as follows. You can comment out the above definition and just add another definition to ease toggling the live monitoring.
// comment out #spark.driver.extraJavaOptions=-javaagent:/opt/cloudera/parcels/UNRAVEL_SENSOR/lib/java/btrace-agent.jar=libs=spark-
<spark-version>
,script=StreamingProbe.btclass,config=driver // and add spark.driver.extraJavaOptions=-javaagent:/opt/cloudera/parcels/UNRAVEL_SENSOR/lib/java/btrace-agent.jar=libs=spark-<spark-version>
,config=driver
Depending on your Unravel version and platform the BTrace jars are located in /usr/local/unravel-agent/jars
or /usr/local/unravel-jars
. Substitute your jar location for JAR_location
below,
To enable the probe edit
spark-defaults.conf
and set the property as follows:spark.driver.extraJavaOptions=-javaagent:
JAR_location
/btrace-agent.jar=libs=spark-<spark-version>
,script=StreamingProbe.btclass,config=driverSet spark.driver.extraJavaOptions as follows. You can comment out the above definition and just add another definition to ease toggling the live monitoring.
// comment out #spark.driver.extraJavaOptions=-javaagent:
JAR_location
/btrace-agent.jar=libs=spark-<spark-version>
,script=StreamingProbe.btclass,config=driver // and add spark.driver.extraJavaOptions=-javaagent:JAR_location
/btrace-agent.jar=libs=spark-<spark-version>
,config=driver