public class MapJoinOperator extends AbstractMapJoinOperator<MapJoinDesc> implements Serializable
Operator.Counter, Operator.OperatorFunc, Operator.State| Modifier and Type | Field and Description |
|---|---|
protected HybridHashTableContainer |
firstSmallTable |
protected int |
fullOuterBigTableRetainSize |
protected MapJoinTableContainer.ReusableGetAdaptor[] |
hashMapRowGetters |
protected boolean |
isFullOuterMapJoin |
protected boolean |
isTestingNoHashTableLoad |
protected HashTableLoader |
loader |
protected MapJoinTableContainer[] |
mapJoinTables |
protected MatchTracker |
matchTracker |
protected MapJoinBytesTableContainer[] |
spilledMapJoinTables |
emptyList, joinKeys, joinKeysObjectInspectors, posBigTablealias, aliasFilterTags, aliasFilterTagsNext, condn, countAfterReport, dummyObj, dummyObjVectors, filterMaps, filterTags, forwardCache, heartbeatInterval, intermediate, joinFilterObjectInspectors, joinFilters, joinValues, joinValuesObjectInspectors, joinValuesStandardObjectInspectors, needsPostEvaluation, noOuterJoin, NOTSKIPBIGTABLE, nullsafes, numAliases, offsets, order, residualJoinFilters, residualJoinFiltersOIs, rowContainerPostFilteredOuterJoin, rowContainerStandardObjectInspectors, skipVectors, spillTableDesc, totalSzabortOp, asyncInitOperations, cContext, childOperators, childOperatorsArray, childOperatorsTag, conf, CONTEXT_NAME_KEY, done, groupKeyObject, HIVE_COUNTER_CREATED_DYNAMIC_PARTITIONS, HIVE_COUNTER_CREATED_FILES, HIVE_COUNTER_FATAL, id, inputObjInspectors, numRows, operatorId, out, outputObjInspector, parentOperators, reporter, runTimeNumRows, state, statsMap| Modifier | Constructor and Description |
|---|---|
protected |
MapJoinOperator()
Kryo ctor.
|
|
MapJoinOperator(AbstractMapJoinOperator<? extends MapJoinDesc> mjop) |
|
MapJoinOperator(CompilationOpContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canSkipJoinProcessing(ExecMapperContext mapContext) |
protected boolean |
canSkipReload(ExecMapperContext mapContext) |
void |
cleanUpInputFileChangedOp() |
void |
closeOp(boolean abort)
All done.
|
protected void |
completeInitializationOp(Object[] os)
This method can be used to retrieve the results from async operations
started at init time - before the operator pipeline is started.
|
void |
endGroup()
Forward a record of join results.
|
protected void |
generateFullOuterSmallTableNoMatches(byte smallTablePos,
MapJoinTableContainer substituteSmallTable) |
void |
generateMapMetaData() |
String |
getCacheKey() |
protected HashTableLoader |
getHashTableLoader(org.apache.hadoop.conf.Configuration hconf) |
String |
getName()
Implements the getName function for the Node Interface.
|
static String |
getOperatorName() |
protected MapJoinKey |
getRefKey(byte alias) |
OperatorType |
getType()
Return the type of the specific operator among the
types in OperatorType.
|
protected List<ObjectInspector> |
getValueObjectInspectors(byte alias,
List<ObjectInspector>[] aliasToObjectInspectors) |
protected void |
initializeOp(org.apache.hadoop.conf.Configuration hconf)
Operator specific initialization.
|
protected boolean |
isInputFileChangeSensitive(ExecMapperContext mapContext) |
protected org.apache.commons.lang3.tuple.Pair<MapJoinTableContainer[],MapJoinTableContainerSerDe[]> |
loadHashTable(ExecMapperContext mapContext,
MapredContext mrContext) |
void |
process(Object row,
int tag)
Process the row.
|
protected void |
reloadHashTable(byte pos,
int partitionId)
Reload hashtable from the hash partition.
|
protected void |
reProcessBigTable(int partitionId)
Iterate over the big table row container and feed process() with leftover rows
|
protected JoinUtil.JoinResult |
setMapJoinKey(MapJoinTableContainer.ReusableGetAdaptor dest,
Object row,
byte alias) |
protected JoinUtil.JoinResult |
setMapJoinKeyNoNulls(MapJoinTableContainer.ReusableGetAdaptor dest,
Object row,
byte alias,
MatchTracker matchTracker) |
void |
setTestMapJoinTableContainer(int posSmallTable,
MapJoinTableContainer testMapJoinTableContainer,
MapJoinTableContainerSerDe mapJoinTableContainerSerDe) |
protected void |
spillBigTableRow(MapJoinTableContainer hybridHtContainer,
Object row)
Postpone processing the big table row temporarily by spilling it to a row container
|
void |
startGroup() |
addToAliasFilterTags, checkAndGenObject, getFilteredValue, getFilterTag, getNextSize, getPosToAliasMap, hasFilter, internalForward, opAllowedAfterMapJoin, opAllowedBeforeMapJoin, reportProgress, setPosToAliasMapabort, acceptLimitPushdown, allInitializedParentsAreClosed, areAllParentsInitialized, augmentPlan, cleanUpInputFileChanged, clone, cloneOp, cloneRecursiveChildren, close, columnNamesRowResolvedCanBeObtained, createDummy, defaultEndGroup, defaultStartGroup, dump, dump, flush, flushRecursive, forward, getAdditionalCounters, getChildOperators, getChildren, getColumnExprMap, getCompilationOpContext, getConf, getConfiguration, getCounterName, getDone, getExecContext, getGroupKeyObject, getIdentifier, getInputObjInspectors, getIsReduceSink, getMarker, getNextCntr, getNumChild, getNumParent, getOperatorId, getOpTraits, getOutputObjInspector, getParentOperators, getReduceOutputName, getSchema, getStatistics, getStats, initEvaluators, initEvaluators, initEvaluatorsAndReturnStruct, initialize, initialize, initializeChildren, initializeLocalWork, initOperatorId, isUseBucketizedHiveInputFormat, jobClose, jobCloseOp, logicalEquals, logicalEqualsTree, logStats, opAllowedBeforeSortMergeJoin, opAllowedConvertMapJoin, passExecContext, preorderMap, processGroup, removeChild, removeChildAndAdoptItsChildren, removeParent, removeParents, replaceChild, replaceParent, replaceTabAlias, reset, setAlias, setChildOperators, setColumnExprMap, setCompilationOpContext, setConf, setDone, setExecContext, setGroupKeyObject, setInputContext, setInputObjInspectors, setMarker, setNextVectorBatchGroupStatus, setOpTraits, setOutputCollector, setParentOperators, setReporter, setSchema, setStatistics, setUseBucketizedHiveInputFormat, supportAutomaticSortMergeJoin, supportSkewJoinOptimization, supportUnionRemoveOptimization, toString, toString, toString, vectorForwardprotected HashTableLoader loader
protected transient MapJoinTableContainer[] mapJoinTables
protected transient MapJoinTableContainer.ReusableGetAdaptor[] hashMapRowGetters
protected transient MapJoinBytesTableContainer[] spilledMapJoinTables
protected HybridHashTableContainer firstSmallTable
protected transient boolean isFullOuterMapJoin
protected transient int fullOuterBigTableRetainSize
protected transient MatchTracker matchTracker
protected transient boolean isTestingNoHashTableLoad
protected MapJoinOperator()
public MapJoinOperator(CompilationOpContext ctx)
public MapJoinOperator(AbstractMapJoinOperator<? extends MapJoinDesc> mjop)
public void endGroup()
throws HiveException
CommonJoinOperatorendGroup in class CommonJoinOperator<MapJoinDesc>HiveExceptionpublic void startGroup()
throws HiveException
startGroup in class CommonJoinOperator<MapJoinDesc>HiveExceptionprotected HashTableLoader getHashTableLoader(org.apache.hadoop.conf.Configuration hconf)
public String getCacheKey()
protected void initializeOp(org.apache.hadoop.conf.Configuration hconf)
throws HiveException
OperatorinitializeOp in class AbstractMapJoinOperator<MapJoinDesc>HiveExceptionprotected void completeInitializationOp(Object[] os) throws HiveException
OperatorcompleteInitializationOp in class Operator<MapJoinDesc>HiveExceptionpublic void setTestMapJoinTableContainer(int posSmallTable,
MapJoinTableContainer testMapJoinTableContainer,
MapJoinTableContainerSerDe mapJoinTableContainerSerDe)
protected List<ObjectInspector> getValueObjectInspectors(byte alias, List<ObjectInspector>[] aliasToObjectInspectors)
getValueObjectInspectors in class AbstractMapJoinOperator<MapJoinDesc>public void generateMapMetaData()
throws HiveException
HiveExceptionprotected org.apache.commons.lang3.tuple.Pair<MapJoinTableContainer[],MapJoinTableContainerSerDe[]> loadHashTable(ExecMapperContext mapContext, MapredContext mrContext) throws HiveException
HiveExceptionpublic void cleanUpInputFileChangedOp()
throws HiveException
cleanUpInputFileChangedOp in class Operator<MapJoinDesc>HiveExceptionprotected JoinUtil.JoinResult setMapJoinKey(MapJoinTableContainer.ReusableGetAdaptor dest, Object row, byte alias) throws HiveException
HiveExceptionprotected JoinUtil.JoinResult setMapJoinKeyNoNulls(MapJoinTableContainer.ReusableGetAdaptor dest, Object row, byte alias, MatchTracker matchTracker) throws HiveException
HiveExceptionprotected MapJoinKey getRefKey(byte alias)
public void process(Object row, int tag) throws HiveException
Operatorprocess in class Operator<MapJoinDesc>row - The object representing the row.tag - The tag of the row usually means which parent this row comes from.
Rows with the same tag should have exactly the same rowInspector
all the time.HiveExceptionprotected void spillBigTableRow(MapJoinTableContainer hybridHtContainer, Object row) throws HiveException
hybridHtContainer - Hybrid hashtable containerrow - big table rowHiveExceptionprotected void generateFullOuterSmallTableNoMatches(byte smallTablePos,
MapJoinTableContainer substituteSmallTable)
throws HiveException
HiveExceptionpublic void closeOp(boolean abort)
throws HiveException
CommonJoinOperatorcloseOp in class AbstractMapJoinOperator<MapJoinDesc>HiveExceptionprotected void reloadHashTable(byte pos,
int partitionId)
throws IOException,
HiveException,
SerDeException,
ClassNotFoundException
pos - position of small tablepartitionId - the partition of the small table to be reloaded fromIOExceptionHiveExceptionSerDeExceptionClassNotFoundExceptionprotected void reProcessBigTable(int partitionId)
throws HiveException
partitionId - the partition from which to take out spilled big table rowsHiveExceptionpublic String getName()
getName in interface NodegetName in class CommonJoinOperator<MapJoinDesc>public static String getOperatorName()
public OperatorType getType()
OperatorgetType in class AbstractMapJoinOperator<MapJoinDesc>protected boolean isInputFileChangeSensitive(ExecMapperContext mapContext)
protected boolean canSkipReload(ExecMapperContext mapContext)
protected boolean canSkipJoinProcessing(ExecMapperContext mapContext)
Copyright © 2022 The Apache Software Foundation. All rights reserved.