Packages

class RecordBatchingSink[+B <: RecordBatch] extends PartitionGroupingSink

A Sink that uses a specified RecordBatcher to construct record batches and commit them to a specified RecordBatchStorage once they are ready. It is a partition grouping sink, meaning records from each partition group are added to different batches and processed separately. Batch commits to storage are queued up and performed asynchronously in the background for each partition group. The commit queue size is configurable and commits block if the queues get full.

B

Type of record batches.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RecordBatchingSink
  2. PartitionGroupingSink
  3. Logging
  4. Sink
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new RecordBatchingSink(recordBatcher: RecordBatcher[B], batchStorage: RecordBatchStorage[B], batchCommitQueueSize: Int, partitionGrouping: (TopicPartition) => String, retryPolicy: Policy)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. final def assignPartitions(partitions: Set[TopicPartition]): Map[TopicPartition, Option[StreamPosition]]

    Assigns a set of partitions to the sink and returns their committed stream positions.

    Assigns a set of partitions to the sink and returns their committed stream positions. Called during the initial partitions subscription and on subsequent rebalance events.

    partitions

    Set of partitions assigned.

    returns

    Committed stream position map for all the assigned partitions.

    Definition Classes
    PartitionGroupingSinkSink
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. def close(): Unit

    Closes all active sinkers.

    Closes all active sinkers.

    Definition Classes
    PartitionGroupingSinkSink
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def groupForPartition(topicPartition: TopicPartition): String

    Maps a given topic partition to a group name.

    Maps a given topic partition to a group name.

    returns

    A group name, e.g. "root" or topicPartition.topic().

    Definition Classes
    RecordBatchingSinkPartitionGroupingSink
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def heartbeat(): Unit

    Forwards the heartbeat to all sinkers.

    Forwards the heartbeat to all sinkers.

    Definition Classes
    PartitionGroupingSinkSink
  14. def initialize(context: KafkaContext): Unit

    Initializes the sink with a KafkaContext.

    Initializes the sink with a KafkaContext.

    Definition Classes
    RecordBatchingSinkPartitionGroupingSinkSink
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. val kafkaContext: KafkaContext
    Attributes
    protected
    Definition Classes
    PartitionGroupingSink
  17. val log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. final def revokePartitions(partitions: Set[TopicPartition]): Map[TopicPartition, Option[StreamPosition]]

    Revokes a set of partitions from the sink, called during rebalance events.

    Revokes a set of partitions from the sink, called during rebalance events. Returns committed stream positions for partitions that need rewinding.

    partitions

    Set of partitions revoked.

    returns

    Committed stream position map for partitions that need rewinding.

    Definition Classes
    PartitionGroupingSinkSink
  22. final def sinkerForPartitionGroup(groupName: String, groupPartitions: Set[TopicPartition]): PartitionGroupSinker

    Creates a new instance of a PartitionGroupSinker for a given partition group.

    Creates a new instance of a PartitionGroupSinker for a given partition group. These instances are closed and re-created during rebalance events.

    groupName

    Name of the partition group.

    returns

    A new instance of a sinker for the given group.

    Definition Classes
    RecordBatchingSinkPartitionGroupingSink
  23. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  28. def write(record: StreamRecord): Unit

    Forwards a consumer record to the correct partition sinker.

    Forwards a consumer record to the correct partition sinker.

    record

    Stream record to write.

    Definition Classes
    PartitionGroupingSinkSink

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from PartitionGroupingSink

Inherited from Logging

Inherited from Sink

Inherited from AnyRef

Inherited from Any

Ungrouped