Class NoopIndexingStateCache
java.lang.Object
org.apache.druid.segment.metadata.IndexingStateCache
org.apache.druid.segment.metadata.NoopIndexingStateCache
No-op implementation of
IndexingStateCache-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the cache.getIndexingStateByFingerprint(String fingerprint) Retrieves an indexing state by its fingerprint.Gets the full cached map (immutable copy).booleanvoidresetIndexingStatesForPublishedSegments(Map<String, CompactionState> fingerprintToStateMap) Resets the cache with indexing states polled from the metadata store.Methods inherited from class org.apache.druid.segment.metadata.IndexingStateCache
addIndexingState
-
Constructor Details
-
NoopIndexingStateCache
public NoopIndexingStateCache()
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Overrides:
isEnabledin classIndexingStateCache
-
resetIndexingStatesForPublishedSegments
public void resetIndexingStatesForPublishedSegments(Map<String, CompactionState> fingerprintToStateMap) Description copied from class:IndexingStateCacheResets the cache with indexing states polled from the metadata store. Called after each successful poll in HeapMemorySegmentMetadataCache.- Overrides:
resetIndexingStatesForPublishedSegmentsin classIndexingStateCache- Parameters:
fingerprintToStateMap- Complete fp:state map of all active indexing state fingerprints
-
getIndexingStateByFingerprint
Description copied from class:IndexingStateCacheRetrieves an indexing state by its fingerprint. This is the indexing method for reading indexing states.- Overrides:
getIndexingStateByFingerprintin classIndexingStateCache- Parameters:
fingerprint- The fingerprint to look up- Returns:
- The cached indexing state, or Optional.empty() if not cached
-
getPublishedIndexingStateMap
Description copied from class:IndexingStateCacheGets the full cached map (immutable copy). Used by HeapMemorySegmentMetadataCache for delta sync calculations.- Overrides:
getPublishedIndexingStateMapin classIndexingStateCache
-
clear
public void clear()Description copied from class:IndexingStateCacheClears the cache. Called when node stops being leader.- Overrides:
clearin classIndexingStateCache
-
getAndResetStats
- Overrides:
getAndResetStatsin classIndexingStateCache- Returns:
- Summary stats for metric emission
-