Class AbstractTask
- java.lang.Object
-
- org.apache.kafka.streams.processor.internals.AbstractTask
-
- All Implemented Interfaces:
Task
- Direct Known Subclasses:
StandbyTask
,StreamTask
public abstract class AbstractTask extends Object implements Task
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.kafka.streams.processor.internals.Task
Task.State, Task.TaskType
-
-
Field Summary
Fields Modifier and Type Field Description protected TaskId
id
protected Set<TopicPartition>
inputPartitions
protected StateDirectory
stateDirectory
protected ProcessorStateManager
stateMgr
protected ProcessorTopology
topology
-
Fields inherited from interface org.apache.kafka.streams.processor.internals.Task
LATEST_OFFSET
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<TopicPartition>
changelogPartitions()
StateStore
getStore(String name)
TaskId
id()
Set<TopicPartition>
inputPartitions()
boolean
isClosed()
void
markChangelogAsCorrupted(Collection<TopicPartition> partitions)
void
revive()
Revive a closed task to a created one; should never throw an exceptionTask.State
state()
void
update(Set<TopicPartition> topicPartitions, Map<String,List<String>> allTopologyNodesToSourceTopics)
Updates input partitions and topology after rebalance-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.kafka.streams.processor.internals.Task
addRecords, changelogOffsets, closeClean, closeCleanAndRecycleState, closeDirty, commitNeeded, commitRequested, completeRestoration, initializeIfNeeded, isActive, maybePunctuateStreamTime, maybePunctuateSystemTime, needsInitializationOrRestoration, postCommit, prepareCommit, process, purgeableOffsets, recordProcessBatchTime, recordProcessTimeRatioAndBufferSize, resume, suspend
-
-
-
-
Field Detail
-
inputPartitions
protected Set<TopicPartition> inputPartitions
-
topology
protected ProcessorTopology topology
-
id
protected final TaskId id
-
stateDirectory
protected final StateDirectory stateDirectory
-
stateMgr
protected final ProcessorStateManager stateMgr
-
-
Method Detail
-
inputPartitions
public Set<TopicPartition> inputPartitions()
- Specified by:
inputPartitions
in interfaceTask
-
changelogPartitions
public Collection<TopicPartition> changelogPartitions()
- Specified by:
changelogPartitions
in interfaceTask
- Returns:
- any changelog partitions associated with this task
-
markChangelogAsCorrupted
public void markChangelogAsCorrupted(Collection<TopicPartition> partitions)
- Specified by:
markChangelogAsCorrupted
in interfaceTask
-
getStore
public StateStore getStore(String name)
-
state
public final Task.State state()
-
revive
public void revive()
Description copied from interface:Task
Revive a closed task to a created one; should never throw an exception
-
-