public class MapJoinProcessor extends java.lang.Object implements Transform
| Modifier and Type | Class and Description |
|---|---|
static class |
MapJoinProcessor.CurrentMapJoin
CurrentMapJoin.
|
static class |
MapJoinProcessor.Default
Default.
|
static class |
MapJoinProcessor.MapJoinDefault
MapJoinDefault.
|
static class |
MapJoinProcessor.MapJoinFS
MapJoinFS.
|
static class |
MapJoinProcessor.MapJoinWalkerCtx
MapJoinWalkerCtx.
|
| Constructor and Description |
|---|
MapJoinProcessor()
empty constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
checkMapJoin(int mapJoinPos,
JoinCondDesc[] condns) |
static MapJoinOperator |
convertMapJoin(java.util.LinkedHashMap<Operator<? extends OperatorDesc>,OpParseContext> opParseCtxMap,
JoinOperator op,
QBJoinTree joinTree,
int mapJoinPos,
boolean noCheckOuterJoin,
boolean validateMapJoinTree)
convert a regular join to a a map-side join.
|
static MapJoinOperator |
convertSMBJoinToMapJoin(java.util.Map<Operator<? extends OperatorDesc>,OpParseContext> opParseCtxMap,
SMBMapJoinOperator smbJoinOp,
QBJoinTree joinTree,
int bigTablePos,
boolean noCheckOuterJoin)
convert a sortmerge join to a a map-side join.
|
MapJoinOperator |
generateMapJoinOperator(ParseContext pctx,
JoinOperator op,
QBJoinTree joinTree,
int mapJoinPos) |
static java.lang.String |
genLocalWorkForMapJoin(MapredWork newWork,
MapJoinOperator newMapJoinOp,
int mapJoinPos) |
static java.lang.String |
genMapJoinOpAndLocalWork(MapredWork newWork,
JoinOperator op,
int mapJoinPos)
Convert the join to a map-join and also generate any local work needed.
|
static java.util.Set<java.lang.Integer> |
getBigTableCandidates(JoinCondDesc[] condns)
Get a list of big table candidates.
|
static NodeProcessor |
getCurrentMapJoin() |
static NodeProcessor |
getDefault() |
static NodeProcessor |
getMapJoinDefault() |
static NodeProcessor |
getMapJoinFS() |
ParseContext |
transform(ParseContext pactx)
Transform the query tree.
|
public static java.lang.String genMapJoinOpAndLocalWork(MapredWork newWork, JoinOperator op, int mapJoinPos) throws SemanticException
newWork - MapredWork in which the conversion is to happenop - The join operator that needs to be converted to map-joinbigTablePos - SemanticExceptionpublic static java.lang.String genLocalWorkForMapJoin(MapredWork newWork, MapJoinOperator newMapJoinOp, int mapJoinPos) throws SemanticException
SemanticExceptionpublic static MapJoinOperator convertMapJoin(java.util.LinkedHashMap<Operator<? extends OperatorDesc>,OpParseContext> opParseCtxMap, JoinOperator op, QBJoinTree joinTree, int mapJoinPos, boolean noCheckOuterJoin, boolean validateMapJoinTree) throws SemanticException
opParseCtxMap - op - join operatorjoinTree - qb join treemapJoinPos - position of the source to be read as part of map-reduce framework. All other sources
are cached in memorynoCheckOuterJoin - SemanticExceptionpublic static MapJoinOperator convertSMBJoinToMapJoin(java.util.Map<Operator<? extends OperatorDesc>,OpParseContext> opParseCtxMap, SMBMapJoinOperator smbJoinOp, QBJoinTree joinTree, int bigTablePos, boolean noCheckOuterJoin) throws SemanticException
opParseCtxMap - smbJoinOp - join operatorjoinTree - qb join treebigTablePos - position of the source to be read as part of map-reduce framework. All other sources
are cached in memorynoCheckOuterJoin - SemanticExceptionpublic MapJoinOperator generateMapJoinOperator(ParseContext pctx, JoinOperator op, QBJoinTree joinTree, int mapJoinPos) throws SemanticException
SemanticExceptionpublic static java.util.Set<java.lang.Integer> getBigTableCandidates(JoinCondDesc[] condns)
condns - public static int checkMapJoin(int mapJoinPos,
JoinCondDesc[] condns)
mapJoinPos - the position of big table as determined by either hints or auto conversion.condns - the join conditionsSemanticException - if given position is not in the big table candidates.public ParseContext transform(ParseContext pactx) throws SemanticException
transform in interface Transformpactx - current parse contextSemanticExceptionpublic static NodeProcessor getMapJoinFS()
public static NodeProcessor getMapJoinDefault()
public static NodeProcessor getDefault()
public static NodeProcessor getCurrentMapJoin()
Copyright © 2012 The Apache Software Foundation