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 java.lang.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 TaskIdidprotected java.util.Set<org.apache.kafka.common.TopicPartition>inputPartitionsprotected StateDirectorystateDirectoryprotected ProcessorStateManagerstateMgrprotected ProcessorTopologytopology-
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 java.util.Collection<org.apache.kafka.common.TopicPartition>changelogPartitions()StateStoregetStore(java.lang.String name)TaskIdid()java.util.Set<org.apache.kafka.common.TopicPartition>inputPartitions()booleanisClosed()voidmarkChangelogAsCorrupted(java.util.Collection<org.apache.kafka.common.TopicPartition> partitions)voidrevive()Revive a closed task to a created one; should never throw an exceptionTask.Statestate()voidupdate(java.util.Set<org.apache.kafka.common.TopicPartition> topicPartitions, java.util.Map<java.lang.String,java.util.List<java.lang.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 java.util.Set<org.apache.kafka.common.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 java.util.Set<org.apache.kafka.common.TopicPartition> inputPartitions()
- Specified by:
inputPartitionsin interfaceTask
-
changelogPartitions
public java.util.Collection<org.apache.kafka.common.TopicPartition> changelogPartitions()
- Specified by:
changelogPartitionsin interfaceTask- Returns:
- any changelog partitions associated with this task
-
markChangelogAsCorrupted
public void markChangelogAsCorrupted(java.util.Collection<org.apache.kafka.common.TopicPartition> partitions)
- Specified by:
markChangelogAsCorruptedin interfaceTask
-
getStore
public StateStore getStore(java.lang.String name)
-
state
public final Task.State state()
-
revive
public void revive()
Description copied from interface:TaskRevive a closed task to a created one; should never throw an exception
-
update
public void update(java.util.Set<org.apache.kafka.common.TopicPartition> topicPartitions, java.util.Map<java.lang.String,java.util.List<java.lang.String>> allTopologyNodesToSourceTopics)Description copied from interface:TaskUpdates input partitions and topology after rebalance
-
-