public static class HashJoinMemoryCalculatorImpl.BuildSidePartitioningImpl extends Object implements HashJoinMemoryCalculator.BuildSidePartitioning
initialize(boolean, boolean, RecordBatch, RecordBatch, Set, boolean, long, int, int, int, int, int, int, double).
This will initialize the StateCalculate with the additional information it needs.getNumPartitions() to see the number of partitions that fit in memory.shouldSpill() To determine if spilling needs to occurr.next() and get the next memory calculator associated with your next state.| Constructor and Description |
|---|
BuildSidePartitioningImpl(BatchSizePredictor.Factory batchSizePredictorFactory,
HashTableSizeCalculator hashTableSizeCalculator,
HashJoinHelperSizeCalculator hashJoinHelperSizeCalculator,
double fragmentationFactor,
double safetyFactor,
boolean semiJoin) |
| Modifier and Type | Method and Description |
|---|---|
long |
getBuildReservedMemory() |
long |
getMaxReservedMemory() |
int |
getNumPartitions() |
HashJoinState |
getState()
The current
HashJoinState corresponding to this calculator. |
protected void |
initialize(boolean firstCycle,
boolean reserveHash,
CaseInsensitiveMap<Long> keySizes,
long memoryAvailable,
int initialPartitions,
boolean probeEmpty,
BatchSizePredictor buildSizePredictor,
BatchSizePredictor probeSizePredictor,
int recordsPerPartitionBatchBuild,
int recordsPerPartitionBatchProbe,
int maxBatchNumRecordsBuild,
int maxBatchNumRecordsProbe,
int outputBatchSize,
double loadFactor) |
void |
initialize(boolean firstCycle,
boolean reserveHash,
RecordBatch buildBatch,
RecordBatch probeBatch,
Set<String> joinColumns,
boolean probeEmpty,
long memoryAvailable,
int initialPartitions,
int recordsPerPartitionBatchBuild,
int recordsPerPartitionBatchProbe,
int maxBatchNumRecordsBuild,
int maxBatchNumRecordsProbe,
int outputBatchSize,
double loadFactor) |
String |
makeDebugString() |
HashJoinMemoryCalculator.PostBuildCalculations |
next()
Signifies that the current state is complete and returns the next
HashJoinStateCalculator. |
void |
setPartitionStatSet(HashJoinMemoryCalculator.PartitionStatSet partitionStatSet) |
boolean |
shouldSpill() |
public BuildSidePartitioningImpl(BatchSizePredictor.Factory batchSizePredictorFactory, HashTableSizeCalculator hashTableSizeCalculator, HashJoinHelperSizeCalculator hashJoinHelperSizeCalculator, double fragmentationFactor, double safetyFactor, boolean semiJoin)
public void initialize(boolean firstCycle,
boolean reserveHash,
RecordBatch buildBatch,
RecordBatch probeBatch,
Set<String> joinColumns,
boolean probeEmpty,
long memoryAvailable,
int initialPartitions,
int recordsPerPartitionBatchBuild,
int recordsPerPartitionBatchProbe,
int maxBatchNumRecordsBuild,
int maxBatchNumRecordsProbe,
int outputBatchSize,
double loadFactor)
initialize in interface HashJoinMemoryCalculator.BuildSidePartitioningprotected void initialize(boolean firstCycle,
boolean reserveHash,
CaseInsensitiveMap<Long> keySizes,
long memoryAvailable,
int initialPartitions,
boolean probeEmpty,
BatchSizePredictor buildSizePredictor,
BatchSizePredictor probeSizePredictor,
int recordsPerPartitionBatchBuild,
int recordsPerPartitionBatchProbe,
int maxBatchNumRecordsBuild,
int maxBatchNumRecordsProbe,
int outputBatchSize,
double loadFactor)
public void setPartitionStatSet(HashJoinMemoryCalculator.PartitionStatSet partitionStatSet)
setPartitionStatSet in interface HashJoinMemoryCalculator.BuildSidePartitioningpublic int getNumPartitions()
getNumPartitions in interface HashJoinMemoryCalculator.BuildSidePartitioningpublic long getBuildReservedMemory()
getBuildReservedMemory in interface HashJoinMemoryCalculator.BuildSidePartitioningpublic long getMaxReservedMemory()
getMaxReservedMemory in interface HashJoinMemoryCalculator.BuildSidePartitioningpublic boolean shouldSpill()
shouldSpill in interface HashJoinMemoryCalculator.BuildSidePartitioningpublic HashJoinMemoryCalculator.PostBuildCalculations next()
HashJoinStateCalculatorHashJoinStateCalculator.
Returns null in the case where there is no next state.next in interface HashJoinStateCalculator<HashJoinMemoryCalculator.PostBuildCalculations>HashJoinStateCalculator or null if this was the last state.public HashJoinState getState()
HashJoinStateCalculatorHashJoinState corresponding to this calculator.getState in interface HashJoinStateCalculator<HashJoinMemoryCalculator.PostBuildCalculations>public String makeDebugString()
makeDebugString in interface HashJoinMemoryCalculator.BuildSidePartitioningCopyright © 2021 The Apache Software Foundation. All rights reserved.