diff --git a/pom.xml b/pom.xml index 7bef4c4..6876bea 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ 1.7 2.11.8 2.11 - 1.6.1 + 2.0.0-preview 2.4.1 diff --git a/src/main/scala/org/apache/spark/DatadogRelay.scala b/src/main/scala/org/apache/spark/DatadogRelay.scala index 44fd6d4..85499f6 100644 --- a/src/main/scala/org/apache/spark/DatadogRelay.scala +++ b/src/main/scala/org/apache/spark/DatadogRelay.scala @@ -81,14 +81,14 @@ class DatadogRelay(conf: SparkConf) extends SparkFirehoseListener { } case e: SparkListenerTaskStart => statsd.incrementCounter("firehose.taskStarted") - statsd.recordGaugeValue("firehose.taskRetryCount", e.taskInfo.attempt) + statsd.recordGaugeValue("firehose.taskRetryCount", e.taskInfo.attemptNumber) case e: SparkListenerTaskEnd => taskBaseMetrics(statsd, e) if (e.taskMetrics != null) { - e.taskMetrics.inputMetrics.foreach { m => taskInputMetrics(statsd, m) } - e.taskMetrics.shuffleReadMetrics.foreach { m => taskShuffleReadMetrics(statsd, m) } - e.taskMetrics.shuffleWriteMetrics.foreach { m => taskShuffleWriteMetrics(statsd, m) } - e.taskMetrics.outputMetrics.foreach { m => taskOutputMetrics(statsd, m) } + taskInputMetrics(statsd, e.taskMetrics.inputMetrics) + taskShuffleReadMetrics(statsd, e.taskMetrics.shuffleReadMetrics) + taskShuffleWriteMetrics(statsd, e.taskMetrics.shuffleWriteMetrics) + taskOutputMetrics(statsd, e.taskMetrics.outputMetrics) } case e: SparkListenerExecutorAdded => statsd.incrementCounter("firehose.executorAdded")