AssignedStreamsTasks
is a AssignedTasks for StreamTasks that…FIXME
AssignedStreamsTasks
is created along with a StreamThread (when KafkaStreams
is created).
AssignedStreamsTasks
is a RestoringTasks
that…FIXME
It appears that AssignedStreamsTasks
simply operates on the running tasks (i.e. the tasks that are in running internal registry). When requested to process or punctuate AssignedStreamsTasks
simply walks over the running
internal registry and triggers execution of every task.
AssignedStreamsTasks
uses a TaskAction<StreamTask>
called maybeCommit that is used in maybeCommit. The task action takes a stream task and checks if the task needs a commit. If so, the action does the following:
AssignedStreamsTasks
takes a LogContext
when created.
AssignedStreamsTasks
uses stream task for taskTypeName.
Name | Description |
---|---|
|
|
|
|
|
Tip
|
Enable any of Add the following line to
Refer to Application Logging Using log4j. |
int process()
process
requests every running stream task to process a single record.
In the end, process
gives the number of stream tasks that processed a single record successfully.
Note
|
process is used exclusively when TaskManager is requested to process records.
|
In case of a TaskMigratedException
, process
prints out the following INFO message to the logs:
Failed to process stream task [id] since it got migrated to another thread already. Closing it as zombie before triggering a new rebalance.
process
then closes the task (considering the task a zombie). If this reports a RuntimeException
, process
re-throws it.
process
removes the task from running and throws the TaskMigratedException
.
int maybeCommit()
maybeCommit
resets committed to 0 and executes the maybeCommitAction task action (that modifies committed).
In the end, maybeCommit
gives the number of running stream tasks that needed a commit.
Note
|
maybeCommit is used exclusively when TaskManager is requested to maybeCommitActiveTasks.
|
AssignedStreamsTasks
takes the following when created:
-
AssignedStreamsTasks
AssignedStreamsTasks
initializes the internal registries and counters.
AssignedStreamsTasks
is created when…MEFIXME
AssignedStreamsTasks
is created along with…MEFIXME
int punctuate()
punctuate
…FIXME
Note
|
punctuate is used exclusively when TaskManager is requested to punctuate.
|