Package

org.apache.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 a DataSink could be a data store like HBase or simply a console

    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