AbstractStateManager — Base State Manager

AbstractStateManager is the base implementation of the StateManager contract for state managers that use offset checkpointing.

Note
AbstractStateManager is a Java abstract class and cannot be created directly. It is created indirectly for the concrete AbstractStateManagers.

AbstractStateManager uses .checkpoint for the name of the checkpoint offset file.

Table 1. AbstractStateManagers
AbstractStateManager Description

GlobalStateManagerImpl

ProcessorStateManager

Creating AbstractStateManager Instance

AbstractStateManager takes the following to be created:

  • Base directory

  • eosEnabled flag

AbstractStateManager initializes the internal properties.

Note
AbstractStateManager is a Java abstract class and cannot be created directly. It is created indirectly for the concrete AbstractStateManagers.

reinitializeStateStoresForPartitions Method

void reinitializeStateStoresForPartitions(
  Logger log,
  Map<String, StateStore> stateStores,
  Map<String, String> storeToChangelogTopic,
  Collection<TopicPartition> partitions,
  InternalProcessorContext processorContext)

reinitializeStateStoresForPartitions…​FIXME

Note

reinitializeStateStoresForPartitions is used when:

inverseOneToOneMap Internal Method

Map<String, String> inverseOneToOneMap(Map<String, String> origin)

inverseOneToOneMap…​FIXME

Note
inverseOneToOneMap is used exclusively when AbstractStateManager is requested to reinitializeStateStoresForPartitions.

converterForStore Static Method

RecordConverter converterForStore(StateStore store)

converterForStore…​FIXME

Note
converterForStore is used when…​FIXME

Internal Properties

Name Description

checkpoint

Initialized to a new OffsetCheckpoint when AbstractStateManager is created

Used when:

checkpointableOffsets

Collection of Kafka TopicPartitions with offsets (Map<TopicPartition, Long>)

Entries (partitions with offsets) added when:

globalStores

Global state stores by name (managed by GlobalStateManagerImpl mostly)

New state stores added when:

State stores removed when:

  • GlobalStateManagerImpl is requested to close

stores

State stores by name (managed by ProcessorStateManager)

New state stores added when:

State stores removed when:

  • ProcessorStateManager is requested to close

results matching ""

    No results matching ""