Skip to content

Latest commit

 

History

History
69 lines (51 loc) · 2.45 KB

kafka-streams-internals-AbstractTaskCreator.adoc

File metadata and controls

69 lines (51 loc) · 2.45 KB

AbstractTaskCreator

AbstractTaskCreator is the base of task creators (factories) that can create stream processor tasks.

Table 1. AbstractTaskCreator Contract
Method Description

createTask

T createTask(
  Consumer<byte[], byte[]> consumer,
  TaskId id,
  Set<TopicPartition> partitions)

Creates a task

Used exclusively when AbstractTaskCreator is requested to create tasks (when TaskManager is requested for standby or stream tasks)

Note
AbstractTaskCreator is a Java abstract class and cannot be created directly. It is created indirectly when the concrete AbstractTaskCreators are.
Table 2. AbstractTaskCreators
AbstractTaskCreator Description

StandbyTaskCreator

Creates standby tasks

TaskCreator

Creates stream tasks

Creating Tasks — createTasks Method

Collection<T> createTasks(
  Consumer<byte[], byte[]> consumer,
  Map<TaskId, Set<TopicPartition>> tasksToBeCreated)

createTasks…​FIXME

Note
createTasks is used when TaskManager is requested for standby and stream tasks.

Creating AbstractTaskCreator Instance

AbstractTaskCreator takes the following when created: