Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import org.apache.spark.sql._
import org.apache.spark.streaming.dstream.DStream
trait Loader[T] {
def load(input: T)
}
class SuccessLoader(ctx: HiveContext) extends Loader[DStream[Row]] {
override def load(stream: DStream[Row]) = {
// Data aggregation and persistence
}
}
class ErrorLoader(ctx: HiveContext) extends Loader[DStream[Row]] {
// Uploads failed log entries
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.