class InfluxDBSink extends SparkListener
InfluxDBSink: write Spark metrics and application info in near real-time to InfluxDB use this mode to monitor Spark execution workload use for Grafana dashboard and analytics of job execution How to use: attach the InfluxDBSInk to a Spark Context using the extra listener infrastructure. Example: --conf spark.extraListeners=ch.cern.sparkmeasure.InfluxDBSink
Configuration for InfluxDBSink is handled with Spark conf parameters:
spark.sparkmeasure.influxdbURL = InfluxDB endpoint URL example: --conf spark.sparkmeasure.influxdbURL="http://mytestInfluxDB:8086" spark.sparkmeasure.influxdbUsername (can be empty) spark.sparkmeasure.influxdbPassword (can be empty) spark.sparkmeasure.influxdbName, defaults to "sparkmeasure" spark.sparkmeasure.influxdbStagemetrics, boolean, default is false
spark.sparkmeasure.influxdbEnableBatch, boolean, default true Note: this may improve performance, but requires explicitly stopping Spark Sesssion: spark.stop()
This code depends on "influxdb.java", you may need to add the dependency: --packages org.influxdb:influxdb-java:2.14
InfluxDBExtended: provides additional and verbose info on Task execution use: --conf spark.extraListeners=ch.cern.sparkmeasure.InfluxDBSinkExtended
InfluxDBSink: the amount of data generated is relatively small in most applications: O(number_of_stages) InfluxDBSInkExtended can generate a large amount of data O(Number_of_tasks), use with care
- Alphabetic
- By Inheritance
- InfluxDBSink
- SparkListener
- SparkListenerInterface
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new InfluxDBSink(conf: SparkConf)
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
- var appId: String
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- val database: InfluxDB
- val dbName: String
- val enableBatch: Boolean
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val influxDB: InfluxDB
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val logStageMetrics: Boolean
- 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
onApplicationEnd(applicationEnd: SparkListenerApplicationEnd): Unit
- Definition Classes
- InfluxDBSink → SparkListener → SparkListenerInterface
-
def
onApplicationStart(applicationStart: SparkListenerApplicationStart): Unit
- Definition Classes
- InfluxDBSink → SparkListener → SparkListenerInterface
-
def
onBlockManagerAdded(blockManagerAdded: SparkListenerBlockManagerAdded): Unit
- Definition Classes
- SparkListener → SparkListenerInterface
-
def
onBlockManagerRemoved(blockManagerRemoved: SparkListenerBlockManagerRemoved): Unit
- Definition Classes
- SparkListener → SparkListenerInterface
-
def
onBlockUpdated(blockUpdated: SparkListenerBlockUpdated): Unit
- Definition Classes
- SparkListener → SparkListenerInterface
-
def
onEnvironmentUpdate(environmentUpdate: SparkListenerEnvironmentUpdate): Unit
- Definition Classes
- SparkListener → SparkListenerInterface
-
def
onExecutorAdded(executorAdded: SparkListenerExecutorAdded): Unit
- Definition Classes
- InfluxDBSink → SparkListener → SparkListenerInterface
-
def
onExecutorBlacklisted(executorBlacklisted: SparkListenerExecutorBlacklisted): Unit
- Definition Classes
- SparkListener → SparkListenerInterface
-
def
onExecutorBlacklistedForStage(executorBlacklistedForStage: SparkListenerExecutorBlacklistedForStage): Unit
- Definition Classes
- SparkListener → SparkListenerInterface
-
def
onExecutorMetricsUpdate(executorMetricsUpdate: SparkListenerExecutorMetricsUpdate): Unit
- Definition Classes
- SparkListener → SparkListenerInterface
-
def
onExecutorRemoved(executorRemoved: SparkListenerExecutorRemoved): Unit
- Definition Classes
- SparkListener → SparkListenerInterface
-
def
onExecutorUnblacklisted(executorUnblacklisted: SparkListenerExecutorUnblacklisted): Unit
- Definition Classes
- SparkListener → SparkListenerInterface
-
def
onJobEnd(jobEnd: SparkListenerJobEnd): Unit
- Definition Classes
- InfluxDBSink → SparkListener → SparkListenerInterface
-
def
onJobStart(jobStart: SparkListenerJobStart): Unit
- Definition Classes
- InfluxDBSink → SparkListener → SparkListenerInterface
-
def
onNodeBlacklisted(nodeBlacklisted: SparkListenerNodeBlacklisted): Unit
- Definition Classes
- SparkListener → SparkListenerInterface
-
def
onNodeBlacklistedForStage(nodeBlacklistedForStage: SparkListenerNodeBlacklistedForStage): Unit
- Definition Classes
- SparkListener → SparkListenerInterface
-
def
onNodeUnblacklisted(nodeUnblacklisted: SparkListenerNodeUnblacklisted): Unit
- Definition Classes
- SparkListener → SparkListenerInterface
-
def
onOtherEvent(event: SparkListenerEvent): Unit
- Definition Classes
- InfluxDBSink → SparkListener → SparkListenerInterface
-
def
onSpeculativeTaskSubmitted(speculativeTask: SparkListenerSpeculativeTaskSubmitted): Unit
- Definition Classes
- SparkListener → SparkListenerInterface
-
def
onStageCompleted(stageCompleted: SparkListenerStageCompleted): Unit
- Definition Classes
- InfluxDBSink → SparkListener → SparkListenerInterface
-
def
onStageSubmitted(stageSubmitted: SparkListenerStageSubmitted): Unit
- Definition Classes
- InfluxDBSink → SparkListener → SparkListenerInterface
-
def
onTaskEnd(taskEnd: SparkListenerTaskEnd): Unit
- Definition Classes
- SparkListener → SparkListenerInterface
-
def
onTaskGettingResult(taskGettingResult: SparkListenerTaskGettingResult): Unit
- Definition Classes
- SparkListener → SparkListenerInterface
-
def
onTaskStart(taskStart: SparkListenerTaskStart): Unit
- Definition Classes
- SparkListener → SparkListenerInterface
-
def
onUnpersistRDD(unpersistRDD: SparkListenerUnpersistRDD): Unit
- Definition Classes
- SparkListener → SparkListenerInterface
- val password: String
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- val url: String
- val username: String
-
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
- @throws( ... ) @native()