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 Details

    • generateFingerprint

      String generateFingerprint(String dataSource, CompactionState indexingState)
      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 name
      indexingState - The compaction configuration to fingerprint
      Returns:
      A hex-encoded SHA-256 fingerprint string
    • getStateForFingerprint

      Optional<CompactionState> getStateForFingerprint(String fingerprint)
      Retrieves a compaction state by its fingerprint.
      Parameters:
      fingerprint - The fingerprint to look up
      Returns:
      The compaction state, or Optional.empty() if not found