StandbyTaskCreator — Factory of Standby Tasks (StandbyTasks)

StandbyTaskCreator is a concrete task factory of standby tasks (StandbyTasks).

StandbyTaskCreator is created exclusively for StreamThread (standbyTaskCreator) for the only purpose of creating the TaskManager.

StandbyTaskCreator always records when requested to create a task for monitoring purposes, but creates a standby task only for processor task topologies (for which it was created) with at least one state store.

Creating StandbyTaskCreator Instance

StandbyTaskCreator takes the following to be created:

Creating Standby Task — createTask Factory Method

StandbyTask createTask(
  final Consumer<byte[], byte[]> consumer,
  final TaskId taskId,
  final Set<TopicPartition> partitions)
Note
createTask is part of AbstractTaskCreator Contract to create a stream processor task.

createTask records execution (occurence) for monitoring purposes and creates a StandbyTask only if the processor task topology has at least one state store.

Internally, createTask first requests the StreamsMetricsThreadImpl for the taskCreatedSensor and records execution (i.e. increments the counter of how many times createTask was executed).

createTask requests the InternalTopologyBuilder to build the processor task topology for the topicGroupId of the given TaskId.

createTask creates a StandbyTask only if the ProcessorTopology has at least one state store.

If the ProcessorTopology has no state stores, createTask simply prints out the following TRACE message to the logs and returns null.

Skipped standby task [taskId] with assigned partitions [partitions] since it does not have any state stores to materialize

results matching ""

    No results matching ""