Class StandbyTask
- java.lang.Object
-
- org.apache.kafka.streams.processor.internals.AbstractTask
-
- org.apache.kafka.streams.processor.internals.StandbyTask
-
- All Implemented Interfaces:
Task
public class StandbyTask extends AbstractTask
A StandbyTask
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close(boolean clean, boolean isZombie)
-commit()
- close statevoid
closeSuspended(boolean clean, boolean isZombie, java.lang.RuntimeException e)
void
commit()
- flush store - checkpoint store - update offset limitsboolean
initializeStateStores()
Initialize the task and returntrue
if the task is ready to run, i.e, it has not state storesvoid
initializeTopology()
void
resume()
- update offset limitsvoid
suspend()
- flush store - checkpoint storejava.util.List<org.apache.kafka.clients.consumer.ConsumerRecord<byte[],byte[]>>
update(org.apache.kafka.common.TopicPartition partition, java.util.List<org.apache.kafka.clients.consumer.ConsumerRecord<byte[],byte[]>> records)
Updates a state store using records from one change log partition-
Methods inherited from class org.apache.kafka.streams.processor.internals.AbstractTask
activeTaskCheckpointableOffsets, applicationId, changelogPartitions, commitNeeded, context, getStore, hasStateStores, id, isClosed, isEosEnabled, partitions, topology, toString, toString, updateOffsetLimits
-
-
-
-
Method Detail
-
initializeStateStores
public boolean initializeStateStores()
Description copied from interface:Task
Initialize the task and returntrue
if the task is ready to run, i.e, it has not state stores- Returns:
- true if this task has no state stores that may need restoring.
-
initializeTopology
public void initializeTopology()
-
resume
public void resume()
- update offset limits
-
commit
public void commit()
- flush store - checkpoint store - update offset limits
-
suspend
public void suspend()
- flush store - checkpoint store
-
close
public void close(boolean clean, boolean isZombie)
-
commit()
- close state- Parameters:
clean
- ignored byStandbyTask
as it can always try to close cleanly (ie, commit, flush, and write checkpoint file)isZombie
- ignored byStandbyTask
as it can never be a zombie
-
closeSuspended
public void closeSuspended(boolean clean, boolean isZombie, java.lang.RuntimeException e)
-
update
public java.util.List<org.apache.kafka.clients.consumer.ConsumerRecord<byte[],byte[]>> update(org.apache.kafka.common.TopicPartition partition, java.util.List<org.apache.kafka.clients.consumer.ConsumerRecord<byte[],byte[]>> records)
Updates a state store using records from one change log partition- Returns:
- a list of records not consumed
-
-