Class

ch.cern.sparkmeasure

InfluxDBSink

Related Doc: package sparkmeasure

Permalink

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

Linear Supertypes
SparkListener, SparkListenerInterface, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. InfluxDBSink
  2. SparkListener
  3. SparkListenerInterface
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new InfluxDBSink(conf: SparkConf)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. var appId: String

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val database: InfluxDB

    Permalink
  8. val dbName: String

    Permalink
  9. val enableBatch: Boolean

    Permalink
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  15. val influxDB: InfluxDB

    Permalink
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. val logStageMetrics: Boolean

    Permalink
  18. lazy val logger: Logger

    Permalink
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. def onApplicationEnd(applicationEnd: SparkListenerApplicationEnd): Unit

    Permalink
    Definition Classes
    InfluxDBSink → SparkListener → SparkListenerInterface
  23. def onApplicationStart(applicationStart: SparkListenerApplicationStart): Unit

    Permalink
    Definition Classes
    InfluxDBSink → SparkListener → SparkListenerInterface
  24. def onBlockManagerAdded(blockManagerAdded: SparkListenerBlockManagerAdded): Unit

    Permalink
    Definition Classes
    SparkListener → SparkListenerInterface
  25. def onBlockManagerRemoved(blockManagerRemoved: SparkListenerBlockManagerRemoved): Unit

    Permalink
    Definition Classes
    SparkListener → SparkListenerInterface
  26. def onBlockUpdated(blockUpdated: SparkListenerBlockUpdated): Unit

    Permalink
    Definition Classes
    SparkListener → SparkListenerInterface
  27. def onEnvironmentUpdate(environmentUpdate: SparkListenerEnvironmentUpdate): Unit

    Permalink
    Definition Classes
    SparkListener → SparkListenerInterface
  28. def onExecutorAdded(executorAdded: SparkListenerExecutorAdded): Unit

    Permalink
    Definition Classes
    InfluxDBSink → SparkListener → SparkListenerInterface
  29. def onExecutorBlacklisted(executorBlacklisted: SparkListenerExecutorBlacklisted): Unit

    Permalink
    Definition Classes
    SparkListener → SparkListenerInterface
  30. def onExecutorBlacklistedForStage(executorBlacklistedForStage: SparkListenerExecutorBlacklistedForStage): Unit

    Permalink
    Definition Classes
    SparkListener → SparkListenerInterface
  31. def onExecutorMetricsUpdate(executorMetricsUpdate: SparkListenerExecutorMetricsUpdate): Unit

    Permalink
    Definition Classes
    SparkListener → SparkListenerInterface
  32. def onExecutorRemoved(executorRemoved: SparkListenerExecutorRemoved): Unit

    Permalink
    Definition Classes
    SparkListener → SparkListenerInterface
  33. def onExecutorUnblacklisted(executorUnblacklisted: SparkListenerExecutorUnblacklisted): Unit

    Permalink
    Definition Classes
    SparkListener → SparkListenerInterface
  34. def onJobEnd(jobEnd: SparkListenerJobEnd): Unit

    Permalink
    Definition Classes
    InfluxDBSink → SparkListener → SparkListenerInterface
  35. def onJobStart(jobStart: SparkListenerJobStart): Unit

    Permalink
    Definition Classes
    InfluxDBSink → SparkListener → SparkListenerInterface
  36. def onNodeBlacklisted(nodeBlacklisted: SparkListenerNodeBlacklisted): Unit

    Permalink
    Definition Classes
    SparkListener → SparkListenerInterface
  37. def onNodeBlacklistedForStage(nodeBlacklistedForStage: SparkListenerNodeBlacklistedForStage): Unit

    Permalink
    Definition Classes
    SparkListener → SparkListenerInterface
  38. def onNodeUnblacklisted(nodeUnblacklisted: SparkListenerNodeUnblacklisted): Unit

    Permalink
    Definition Classes
    SparkListener → SparkListenerInterface
  39. def onOtherEvent(event: SparkListenerEvent): Unit

    Permalink
    Definition Classes
    InfluxDBSink → SparkListener → SparkListenerInterface
  40. def onSpeculativeTaskSubmitted(speculativeTask: SparkListenerSpeculativeTaskSubmitted): Unit

    Permalink
    Definition Classes
    SparkListener → SparkListenerInterface
  41. def onStageCompleted(stageCompleted: SparkListenerStageCompleted): Unit

    Permalink
    Definition Classes
    InfluxDBSink → SparkListener → SparkListenerInterface
  42. def onStageSubmitted(stageSubmitted: SparkListenerStageSubmitted): Unit

    Permalink
    Definition Classes
    InfluxDBSink → SparkListener → SparkListenerInterface
  43. def onTaskEnd(taskEnd: SparkListenerTaskEnd): Unit

    Permalink
    Definition Classes
    SparkListener → SparkListenerInterface
  44. def onTaskGettingResult(taskGettingResult: SparkListenerTaskGettingResult): Unit

    Permalink
    Definition Classes
    SparkListener → SparkListenerInterface
  45. def onTaskStart(taskStart: SparkListenerTaskStart): Unit

    Permalink
    Definition Classes
    SparkListener → SparkListenerInterface
  46. def onUnpersistRDD(unpersistRDD: SparkListenerUnpersistRDD): Unit

    Permalink
    Definition Classes
    SparkListener → SparkListenerInterface
  47. val password: String

    Permalink
  48. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  49. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  50. val url: String

    Permalink
  51. val username: String

    Permalink
  52. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  54. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from SparkListener

Inherited from SparkListenerInterface

Inherited from AnyRef

Inherited from Any

Ungrouped