Record Class FileSetFingerprint
Computed by FileSetFingerprints#compute as a commutative fold over every file's
(path, mtime, size), with the file count mixed into the final avalanche: the same set listed
in any order yields the same fingerprint, and any file added, removed, or modified yields a different
one. That makes fingerprint-derived cache keys correct-or-miss by construction — no invalidation
protocol.
128 bits, not 64, because a collision serves one set's row count for a different set — a wrong answer, not a slow path. A 64-bit hash birthday-collides around 2^32 distinct sets (reachable on a long-lived coordinator); 128 bits (~2^64) makes it negligible. Non-cryptographic (Murmur3): guards accidental staleness, not an adversary crafting a collision.
Lives in datasources (not the glob impl package) because it is the return type of the
spi.FileList SPI method, alongside its sibling value type PartitionMetadata.
-
Constructor Summary
ConstructorsConstructorDescriptionFileSetFingerprint(long high, long low) Creates an instance of aFileSetFingerprintrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longhigh()Returns the value of thehighrecord component.longlow()Returns the value of thelowrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FileSetFingerprint
public FileSetFingerprint(long high, long low) Creates an instance of aFileSetFingerprintrecord class.- Parameters:
high- the value for thehighrecord componentlow- the value for thelowrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
high
public long high()Returns the value of thehighrecord component.- Returns:
- the value of the
highrecord component
-
low
public long low()Returns the value of thelowrecord component.- Returns:
- the value of the
lowrecord component
-