Skip to content

Instantly share code, notes, and snippets.

@tomaszezula
Created November 9, 2015 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomaszezula/ab672273d84092b93a5b to your computer and use it in GitHub Desktop.
Save tomaszezula/ab672273d84092b93a5b to your computer and use it in GitHub Desktop.
import org.apache.spark.sql._
import org.apache.spark.streaming.dstream.DStream
trait Analyser[T] {
def analyse(input: DStream[T])
}
class WindowAnalyzer(val ctx: HiveContext) extends Analyser[Row] {
override def analyse(input: DStream[T]) {
// Applies analysis on the sliding window, such as volume metrics
}
}
class ThreatIntelSweeper(val ctx: HiveContext) extends Analyser[Row] {
override def analyse(input: DStream[T]) {
// Malicious content identification
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment