Package

io.gearpump.streaming

sink

Permalink

package sink

Visibility
  1. Public
  2. All

Type Members

  1. trait DataSink extends Serializable

    Permalink

    interface to implement custom data sink where result of a DAG is typically written

    interface to implement custom data sink where result of a DAG is typically written

    a DataSink could be a data store like HBase or simply a console

    an example would be like

    class ConsoleSink extends DataSink[String] {
    
      def open(context: TaskContext): Unit = {}
    
      def write(s: String): Unit = {
        Console.println(s)
      }
    
      def close(): Unit = {}
    }

    subclass is required to be serializable

  2. class DataSinkTask extends Task

    Permalink

    general task that runs any DataSink

Value Members

  1. object DataSinkProcessor

    Permalink

    utility that helps user to create a DAG ending in DataSink user should pass in a DataSink.

    utility that helps user to create a DAG ending in DataSink user should pass in a DataSink.

    here is an example to build a DAG that does word count and write to KafkaSink

    val split = Processor[Split](1)
    val sum = Processor[Sum](1)
    val sink = new KafkaSink()
    val sinkProcessor = DataSinkProcessor(sink, 1)
    val dag = split ~> sum ~> sink
  2. object DataSinkTask

    Permalink

Ungrouped