case class StageMetrics(sparkSession: SparkSession) extends Product with Serializable
- Alphabetic
- By Inheritance
- StageMetrics
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new StageMetrics(sparkSession: SparkSession)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def aggregateStageMetrics(nameTempView: String = "PerfStageMetrics"): DataFrame
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def begin(): Long
-
var
beginSnapshot: Long
Variables used to store the start and end time of the period of interest for the metrics report
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- def createAccumulablesDF(nameTempView: String = "AccumulablesStageMetrics"): DataFrame
-
def
createStageMetricsDF(nameTempView: String = "PerfStageMetrics"): DataFrame
Move data recorded from the custom listener into a DataFrame and register it as a view for easier processing
- def end(): Long
- var endSnapshot: Long
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
listenerStage: StageInfoRecorderListener
This inserts the custom Spark Listener into the live Spark Context
- lazy val logger: Logger
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def printAccumulables(): Unit
- def printReport(): Unit
-
def
report(): String
Custom aggregations and post-processing of metrics data
-
def
reportAccumulables(): String
for internal metrics sum all the values, for the accumulables compute max value for each accId and name
-
def
runAndMeasure[T](f: ⇒ T): T
Shortcut to run and measure the metrics for Spark execution, built after spark.time()
-
def
saveData(df: DataFrame, fileName: String, fileFormat: String = "json"): Unit
Helper method to save data, we expect to have small amounts of data so collapsing to 1 partition seems OK
-
def
sendReportPrometheus(serverIPnPort: String, metricsJob: String, labelName: String = sparkSession.sparkContext.appName, labelValue: String = ...): Unit
Send the metrics to Prometheus.
Send the metrics to Prometheus. serverIPnPort: String with prometheus pushgateway address, format is hostIP:Port, metricsJob: job name, labelName: metrics label name, default is sparkSession.sparkContext.appName, labelValue: metrics label value, default is sparkSession.sparkContext.applicationId
- val sparkSession: SparkSession
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )