public class MapJoinOperator extends AbstractMapJoinOperator<MapJoinDesc> implements Serializable
Operator.OperatorFunc, Operator.State| Modifier and Type | Field and Description |
|---|---|
protected HybridHashTableContainer |
firstSmallTable |
protected MapJoinTableContainer.ReusableGetAdaptor[] |
hashMapRowGetters |
protected HashTableLoader |
loader |
protected MapJoinTableContainer[] |
mapJoinTables |
protected MapJoinBytesTableContainer[] |
spilledMapJoinTables |
emptyList, joinKeys, joinKeysObjectInspectors, posBigTablealias, aliasFilterTags, condn, countAfterReport, dummyObj, dummyObjVectors, filterMaps, filterTags, forwardCache, heartbeatInterval, intermediate, joinFilterObjectInspectors, joinFilters, joinValues, joinValuesObjectInspectors, joinValuesStandardObjectInspectors, noOuterJoin, NOTSKIPBIGTABLE, nullsafes, numAliases, offsets, order, rowContainerStandardObjectInspectors, skipVectors, spillTableDesc, totalSzchildOperators, childOperatorsArray, childOperatorsTag, colExprMap, conf, CONTEXT_NAME_KEY, done, groupKeyObject, HIVECOUNTERCREATEDFILES, HIVECOUNTERFATAL, id, inputObjInspectors, isLogDebugEnabled, isLogInfoEnabled, isLogTraceEnabled, operatorId, out, outputObjInspector, parentOperators, PLOG, reporter, state, statsMap| Constructor and Description |
|---|
MapJoinOperator() |
MapJoinOperator(AbstractMapJoinOperator<? extends MapJoinDesc> mjop) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUpInputFileChangedOp() |
void |
closeOp(boolean abort)
All done.
|
protected void |
completeInitializationOp(Object[] os)
This metod 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.
|
void |
generateMapMetaData() |
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 Collection<Future<?>> |
initializeOp(org.apache.hadoop.conf.Configuration hconf)
Operator specific initialization.
|
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 void |
spillBigTableRow(MapJoinTableContainer hybridHtContainer,
Object row)
Postpone processing the big table row temporarily by spilling it to a row container
|
void |
startGroup() |
checkAndGenObject, getFilteredValue, getFilterTag, getNextSize, getPosToAliasMap, hasFilter, internalForward, opAllowedAfterMapJoin, opAllowedBeforeMapJoin, reportProgress, setPosToAliasMapacceptLimitPushdown, allInitializedParentsAreClosed, areAllParentsInitialized, augmentPlan, cleanUpInputFileChanged, clone, cloneOp, cloneRecursiveChildren, close, columnNamesRowResolvedCanBeObtained, createDummy, defaultEndGroup, defaultStartGroup, dump, dump, flush, forward, getAdditionalCounters, getChildOperators, getChildren, getColumnExprMap, getConf, getConfiguration, getDone, getExecContext, getGroupKeyObject, getIdentifier, getInputObjInspectors, getNextCntr, getNumChild, getNumParent, getOperatorId, getOpTraits, getOutputObjInspector, getParentOperators, getSchema, getStatistics, getStats, initEvaluators, initEvaluators, initEvaluatorsAndReturnStruct, initialize, initialize, initializeChildren, initializeLocalWork, initOperatorId, isUseBucketizedHiveInputFormat, jobClose, jobCloseOp, logStats, opAllowedBeforeSortMergeJoin, opAllowedConvertMapJoin, passExecContext, preorderMap, processGroup, removeChild, removeChildAndAdoptItsChildren, removeChildren, removeParent, replaceChild, replaceParent, reset, resetId, resetStats, setAlias, setChildOperators, setColumnExprMap, setConf, setDone, setExecContext, setGroupKeyObject, setId, setInputContext, setInputObjInspectors, setOperatorId, setOpTraits, setOutputCollector, setParentOperators, setReporter, setSchema, setStatistics, setUseBucketizedHiveInputFormat, supportAutomaticSortMergeJoin, supportSkewJoinOptimization, supportUnionRemoveOptimization, toString, toStringprotected HashTableLoader loader
protected transient MapJoinTableContainer[] mapJoinTables
protected transient MapJoinTableContainer.ReusableGetAdaptor[] hashMapRowGetters
protected transient MapJoinBytesTableContainer[] spilledMapJoinTables
protected HybridHashTableContainer firstSmallTable
public MapJoinOperator()
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)
protected Collection<Future<?>> initializeOp(org.apache.hadoop.conf.Configuration hconf) throws HiveException
OperatorinitializeOp in class AbstractMapJoinOperator<MapJoinDesc>HiveExceptionprotected final void completeInitializationOp(Object[] os) throws HiveException
OperatorcompleteInitializationOp in class Operator<MapJoinDesc>HiveExceptionprotected 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 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 rowHiveExceptionpublic 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>Copyright © 2017 The Apache Software Foundation. All rights reserved.