Interface IndexingStateFingerprintMapper
- All Known Implementing Classes:
DefaultIndexingStateFingerprintMapper
public interface IndexingStateFingerprintMapper
Provides operations for mapping between indexing state fingerprints and their corresponding states.
This interface abstracts the fingerprint generation and lookup operations, simplifying dependencies and improving testability for classes that need both operations.
-
Method Summary
Modifier and TypeMethodDescriptiongenerateFingerprint(String dataSource, CompactionState indexingState) Generates a deterministic fingerprint for the given indexing state and datasource.getStateForFingerprint(String fingerprint) Retrieves a compaction state by its fingerprint.
-
Method Details
-
generateFingerprint
Generates a deterministic fingerprint for the given indexing state and datasource.The fingerprint is a SHA-256 hash of the datasource name and serialized indexing state that is globally unique in the segment space.
- Parameters:
dataSource- The datasource nameindexingState- The compaction configuration to fingerprint- Returns:
- A hex-encoded SHA-256 fingerprint string
-
getStateForFingerprint
Retrieves a compaction state by its fingerprint.- Parameters:
fingerprint- The fingerprint to look up- Returns:
- The compaction state, or Optional.empty() if not found
-