Package

org.apache.gearpump.streaming

source

Permalink

package source

Visibility
  1. Public
  2. All

Type Members

  1. trait DataSource extends Serializable

    Permalink

    Interface to implement custom source where data is read into the system.

    Interface to implement custom source where data is read into the system. a DataSource could be a message queue like kafka or simply data generation source.

    An example would be like

    GenMsgSource extends DataSource {
    
      def open(context: TaskContext, startTime: TimeStamp): Unit = {}
    
      def read(context: TaskContext): Message = {
        Message("message")
      }
    
      def close(): Unit = {}
    }

    subclass is required to be serializable

  2. class DataSourceTask[IN, OUT] extends Task

    Permalink

    Default Task container for org.apache.gearpump.streaming.source.DataSource that reads from DataSource in batch See org.apache.gearpump.streaming.source.DataSourceProcessor for its usage

    Default Task container for org.apache.gearpump.streaming.source.DataSource that reads from DataSource in batch See org.apache.gearpump.streaming.source.DataSourceProcessor for its usage

    DataSourceTask calls:

  3. case class Watermark(instant: Instant) extends Product with Serializable

    Permalink

    message used by source task to report source watermark.

Value Members

  1. object DataSourceConfig

    Permalink
  2. object DataSourceProcessor

    Permalink

    Utility that helps user to create a DAG starting with DataSourceTask user should pass in a DataSource

    Utility that helps user to create a DAG starting with DataSourceTask user should pass in a DataSource

    Here is an example to build a DAG that reads from Kafka source followed by word count

    val source = new KafkaSource()
    val sourceProcessor =  DataSourceProcessor(source, 1)
    val split = Processor[Split](1)
    val sum = Processor[Sum](1)
    val dag = sourceProcessor ~> split ~> sum
  3. object Watermark extends Serializable

    Permalink

Ungrouped