Class InPlaceMutableHashTable.HashTableProber<PT>
java.lang.Object
org.apache.flink.runtime.operators.hash.AbstractHashTableProber<PT,T>
org.apache.flink.runtime.operators.hash.InPlaceMutableHashTable.HashTableProber<PT>
- Type Parameters:
PT- The type of the records that we are probing with
- Enclosing class:
- InPlaceMutableHashTable<T>
public final class InPlaceMutableHashTable.HashTableProber<PT>
extends AbstractHashTableProber<PT,T>
A prober for accessing the table. In addition to getMatchFor and updateMatch, it also has
insertAfterNoMatch. Warning: Don't modify the table between calling getMatchFor and the other
methods!
-
Field Summary
Fields inherited from class org.apache.flink.runtime.operators.hash.AbstractHashTableProber
pairComparator, probeTypeComparator -
Constructor Summary
ConstructorsConstructorDescriptionHashTableProber(org.apache.flink.api.common.typeutils.TypeComparator<PT> probeTypeComparator, org.apache.flink.api.common.typeutils.TypePairComparator<PT, T> pairComparator) -
Method Summary
Modifier and TypeMethodDescriptiongetMatchFor(PT probeSideRecord) getMatchFor(PT record, T targetForMatch) Searches the hash table for the record with the given key.voidinsertAfterNoMatch(T record) This method can be called after getMatchFor returned null.voidupdateMatch(T newRecord) This method can be called after getMatchFor returned a match.
-
Constructor Details
-
HashTableProber
-
-
Method Details
-
getMatchFor
Searches the hash table for the record with the given key. (If there would be multiple matches, only one is returned.)- Specified by:
getMatchForin classAbstractHashTableProber<PT,T> - Parameters:
record- The record whose key we are searching fortargetForMatch- If a match is found, it will be written here- Returns:
- targetForMatch if a match is found, otherwise null.
-
getMatchFor
- Specified by:
getMatchForin classAbstractHashTableProber<PT,T>
-
updateMatch
This method can be called after getMatchFor returned a match. It will overwrite the record that was found by getMatchFor. Warning: The new record should have the same key as the old! WARNING; Don't do any modifications to the table between getMatchFor and updateMatch!- Specified by:
updateMatchin classAbstractHashTableProber<PT,T> - Parameters:
newRecord- The record to override the old record with.- Throws:
IOException- (EOFException specifically, if memory ran out)
-
insertAfterNoMatch
This method can be called after getMatchFor returned null. It inserts the given record to the hash table. Important: The given record should have the same key as the record that was given to getMatchFor! WARNING; Don't do any modifications to the table between getMatchFor and insertAfterNoMatch!- Throws:
IOException- (EOFException specifically, if memory ran out)
-