Skip to content

Commit

Permalink
Merge pull request #6 from JasonMWhite/better_tags
Browse files Browse the repository at this point in the history
make tags work more better now
  • Loading branch information
JasonMWhite committed Oct 6, 2015
2 parents 0f02931 + 186ab8b commit eb55cc9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 39 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>com.timgroup</groupId>
<artifactId>java-statsd-client</artifactId>
<version>3.0.1</version>
<groupId>com.indeed</groupId>
<artifactId>java-dogstatsd-client</artifactId>
<version>2.0.12</version>
</dependency>
<dependency>
<groupId>org.scalatest</groupId>
Expand Down
11 changes: 7 additions & 4 deletions src/main/scala/org/apache/spark/DatadogRelay.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,21 @@ import org.apache.spark.scheduler._
import org.apache.spark.executor._
import scala.concurrent.ExecutionContext.Implicits.global

import org.apache.spark.tagUtils._

class DatadogRelay(conf: SparkConf) extends SparkFirehoseListener {

implicit val tags: List[String] = {
val tags: List[String] = {
val datadogTags = conf.get("spark.datadog.tags", "")
if (datadogTags == "") List() else datadogTags.split(",").toList
}

val statsdOption: Option[NonBlockingStatsDClient] = {
try {
Some(new NonBlockingStatsDClient("spark", "localhost", 8125))
Some(new NonBlockingStatsDClient(
"spark",
"localhost",
8125,
tags.mkString(",")
))
} catch {
case ex: StatsDClientException => None
case ex: Exception => throw ex
Expand Down
32 changes: 0 additions & 32 deletions src/main/scala/org/apache/spark/StatsDClientWithTag.scala

This file was deleted.

0 comments on commit eb55cc9

Please sign in to comment.