Class HashJoinMemoryCalculatorImpl
java.lang.Object
org.apache.drill.exec.physical.impl.join.HashJoinMemoryCalculatorImpl
- All Implemented Interfaces:
HashJoinMemoryCalculator
,HashJoinStateCalculator<HashJoinMemoryCalculator.BuildSidePartitioning>
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
At this point we need to reserve memory for the following: An incoming batch An incomplete batch for each partition If there is available memory we keep the batches for each partition in memory.static class
static class
static class
In this state, we need to make sure there is enough room to spill probe side batches, if spilling is necessary.Nested classes/interfaces inherited from interface org.apache.drill.exec.physical.impl.join.HashJoinMemoryCalculator
HashJoinMemoryCalculator.BatchStat, HashJoinMemoryCalculator.BuildSidePartitioning, HashJoinMemoryCalculator.PartitionStat, HashJoinMemoryCalculator.PartitionStatSet, HashJoinMemoryCalculator.PostBuildCalculations
-
Constructor Summary
ConstructorDescriptionHashJoinMemoryCalculatorImpl
(double safetyFactor, double fragmentationFactor, double hashTableDoublingFactor, String hashTableCalculatorType, boolean semiJoin) -
Method Summary
Modifier and TypeMethodDescriptiongetState()
The currentHashJoinState
corresponding to this calculator.void
initialize
(boolean doMemoryCalculation) next()
Signifies that the current state is complete and returns the nextHashJoinStateCalculator
.
-
Constructor Details
-
HashJoinMemoryCalculatorImpl
public HashJoinMemoryCalculatorImpl(double safetyFactor, double fragmentationFactor, double hashTableDoublingFactor, String hashTableCalculatorType, boolean semiJoin)
-
-
Method Details
-
initialize
public void initialize(boolean doMemoryCalculation) - Specified by:
initialize
in interfaceHashJoinMemoryCalculator
-
next
Description copied from interface:HashJoinStateCalculator
Signifies that the current state is complete and returns the nextHashJoinStateCalculator
. Returns null in the case where there is no next state.- Specified by:
next
in interfaceHashJoinStateCalculator<HashJoinMemoryCalculator.BuildSidePartitioning>
- Returns:
- The next
HashJoinStateCalculator
or null if this was the last state.
-
getState
Description copied from interface:HashJoinStateCalculator
The currentHashJoinState
corresponding to this calculator.- Specified by:
getState
in interfaceHashJoinStateCalculator<HashJoinMemoryCalculator.BuildSidePartitioning>
- Returns:
-