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.
TaskCreator
takes the following to be created:
-
Kafka Producer (
Producer<byte[], byte[]>
)
StreamTask createTask(
Consumer<byte[], byte[]> consumer,
TaskId taskId,
Set<TopicPartition> partitions)
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).
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).
|