Class TaskManager
- java.lang.Object
-
- org.apache.kafka.streams.processor.internals.TaskManager
-
public class TaskManager extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
executeAndMaybeSwallow(boolean clean, Runnable runnable, String name, org.slf4j.Logger log)
static void
executeAndMaybeSwallow(boolean clean, Runnable runnable, Consumer<RuntimeException> actionIfClean, Consumer<RuntimeException> actionIfNotClean)
Map<TaskId,Long>
getTaskOffsetSums()
Compute the offset total summed across all stores in a task.void
handleAssignment(Map<TaskId,Set<TopicPartition>> activeTasks, Map<TaskId,Set<TopicPartition>> standbyTasks)
UUID
processId()
void
setPartitionResetter(Consumer<Set<TopicPartition>> resetter)
String
toString()
Produces a string representation containing useful information about the TaskManager.String
toString(String indent)
-
-
-
Method Detail
-
processId
public UUID processId()
-
handleAssignment
public void handleAssignment(Map<TaskId,Set<TopicPartition>> activeTasks, Map<TaskId,Set<TopicPartition>> standbyTasks)
- Throws:
TaskMigratedException
- if the task producer got fenced (EOS only)StreamsException
- fatal error while creating / initializing the task public for upgrade testing only
-
getTaskOffsetSums
public Map<TaskId,Long> getTaskOffsetSums()
Compute the offset total summed across all stores in a task. Includes offset sum for any tasks we own the lock for, which includes assigned and unassigned tasks we locked intryToLockAllNonEmptyTaskDirectories()
. Does not include stateless or non-logged tasks.
-
toString
public String toString()
Produces a string representation containing useful information about the TaskManager. This is useful in debugging scenarios.
-
executeAndMaybeSwallow
public static void executeAndMaybeSwallow(boolean clean, Runnable runnable, Consumer<RuntimeException> actionIfClean, Consumer<RuntimeException> actionIfNotClean)
-
executeAndMaybeSwallow
public static void executeAndMaybeSwallow(boolean clean, Runnable runnable, String name, org.slf4j.Logger log)
-
setPartitionResetter
public void setPartitionResetter(Consumer<Set<TopicPartition>> resetter)
-
-