StreamTask createTask(
Consumer<byte[], byte[]> consumer,
TaskId taskId,
Set<TopicPartition> partitions)
TaskCreator — Factory of Stream Processor Tasks (StreamTasks)
TaskCreator
is a concrete task factory of stream processor tasks (StreamTasks).
TaskCreator
is created exclusively for StreamThread (activeTaskCreator) for the only purpose of creating the TaskManager.
Creating TaskCreator Instance
TaskCreator
takes the following to be created:
-
Kafka Producer (
Producer<byte[], byte[]>
)
Creating Stream Task — createTask
Factory Method
Note
|
createTask is part of AbstractTaskCreator Contract to create a concrete stream processor task.
|
createTask
requests the taskCreatedSensor to record this execution.
createTask
then creates a StreamTask (for a given topic group ID and a producer client for the task).
createProducer
Internal Method
Producer<byte[], byte[]> createProducer(final TaskId id)
createProducer
…FIXME
Note
|
createProducer is used exclusively when TaskCreator is requested to create a stream processor task (for a task ID).
|