Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added FindMissingSpans.scala

  • Loading branch information...
commit 77a80d8d4891bf4edaf591ff5cbf7caeb5efdd57 1 parent 09aa718
@jerryli9876 jerryli9876 authored
View
15 zipkin-hadoop/src/main/scala/com/twitter/zipkin/hadoop/FindMissingSpans.scala
@@ -0,0 +1,15 @@
+package com.twitter.zipkin.hadoop
+
+import com.twitter.zipkin.gen.{BinaryAnnotation, Span, Annotation}
+import com.twitter.scalding.{Tsv, DefaultDateRangeJob, Job, Args}
+import sources.{PrepNoNamesSpanSource, SpanSource}
+
+class FindMissingSpans(args: Args) extends Job(args) with DefaultDateRangeJob {
+
+ val preprocessed = SpanSource()
+ .read
+ .mapTo(0 -> ('trace_id, 'id, 'parent_id, 'annotations, 'binary_annotations))
+ { s: Span => (s.trace_id, s.id, s.parent_id, s.annotations.toList, s.binary_annotations.toList) }
+ .groupAll( _.size('count) )
+ .write(Tsv(args("output")))
+}
Please sign in to comment.
Something went wrong with that request. Please try again.