public class MapJoinProcessor extends 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() |
| Modifier and Type | Method and Description |
|---|---|
static int |
checkMapJoin(int mapJoinPos,
JoinCondDesc[] condns) |
static MapJoinOperator |
convertJoinOpMapJoinOp(HiveConf hconf,
JoinOperator op,
boolean leftInputJoin,
String[] baseSrc,
List<String> mapAliases,
int mapJoinPos,
boolean noCheckOuterJoin) |
static MapJoinOperator |
convertJoinOpMapJoinOp(HiveConf hconf,
JoinOperator op,
boolean leftInputJoin,
String[] baseSrc,
List<String> mapAliases,
int mapJoinPos,
boolean noCheckOuterJoin,
boolean adjustParentsChildren) |
MapJoinOperator |
convertMapJoin(HiveConf conf,
JoinOperator op,
boolean leftInputJoin,
String[] baseSrc,
List<String> mapAliases,
int mapJoinPos,
boolean noCheckOuterJoin,
boolean validateMapJoinTree)
convert a regular join to a a map-side join.
|
static MapJoinOperator |
convertSMBJoinToMapJoin(HiveConf hconf,
SMBMapJoinOperator smbJoinOp,
int bigTablePos,
boolean noCheckOuterJoin)
convert a sortmerge join to a a map-side join.
|
MapJoinOperator |
generateMapJoinOperator(ParseContext pctx,
JoinOperator op,
int mapJoinPos) |
static void |
genLocalWorkForMapJoin(MapredWork newWork,
MapJoinOperator newMapJoinOp,
int mapJoinPos) |
static void |
genMapJoinOpAndLocalWork(HiveConf conf,
MapredWork newWork,
JoinOperator op,
int mapJoinPos)
Convert the join to a map-join and also generate any local work needed.
|
protected void |
genSelectPlan(ParseContext pctx,
MapJoinOperator input) |
static Set<Integer> |
getBigTableCandidates(JoinCondDesc[] condns)
Get a list of big table candidates.
|
static NodeProcessor |
getCurrentMapJoin() |
static NodeProcessor |
getDefault() |
static ObjectPair<List<ReduceSinkOperator>,Map<Byte,List<ExprNodeDesc>>> |
getKeys(boolean leftInputJoin,
String[] baseSrc,
JoinOperator op) |
static NodeProcessor |
getMapJoinDefault() |
static MapJoinDesc |
getMapJoinDesc(HiveConf hconf,
JoinOperator op,
boolean leftInputJoin,
String[] baseSrc,
List<String> mapAliases,
int mapJoinPos,
boolean noCheckOuterJoin) |
static MapJoinDesc |
getMapJoinDesc(HiveConf hconf,
JoinOperator op,
boolean leftInputJoin,
String[] baseSrc,
List<String> mapAliases,
int mapJoinPos,
boolean noCheckOuterJoin,
boolean adjustParentsChildren) |
static NodeProcessor |
getMapJoinFS() |
ParseContext |
transform(ParseContext pactx)
Transform the query tree.
|
beginPerfLogging, endPerfLogging, endPerfLoggingpublic static void genMapJoinOpAndLocalWork(HiveConf conf, 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-joinmapJoinPos - SemanticExceptionpublic static void genLocalWorkForMapJoin(MapredWork newWork, MapJoinOperator newMapJoinOp, int mapJoinPos) throws SemanticException
SemanticExceptionpublic MapJoinOperator convertMapJoin(HiveConf conf, JoinOperator op, boolean leftInputJoin, String[] baseSrc, List<String> mapAliases, 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 - validateMapJoinTree - SemanticExceptionpublic static MapJoinOperator convertJoinOpMapJoinOp(HiveConf hconf, JoinOperator op, boolean leftInputJoin, String[] baseSrc, List<String> mapAliases, int mapJoinPos, boolean noCheckOuterJoin) throws SemanticException
SemanticExceptionpublic static MapJoinOperator convertJoinOpMapJoinOp(HiveConf hconf, JoinOperator op, boolean leftInputJoin, String[] baseSrc, List<String> mapAliases, int mapJoinPos, boolean noCheckOuterJoin, boolean adjustParentsChildren) throws SemanticException
SemanticExceptionpublic static MapJoinOperator convertSMBJoinToMapJoin(HiveConf hconf, SMBMapJoinOperator smbJoinOp, 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, int mapJoinPos) throws SemanticException
SemanticExceptionpublic static Set<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.protected void genSelectPlan(ParseContext pctx, MapJoinOperator input) throws SemanticException
SemanticExceptionpublic ParseContext transform(ParseContext pactx) throws SemanticException
transform in class Transformpactx - current parse contextSemanticExceptionpublic static NodeProcessor getMapJoinFS()
public static NodeProcessor getMapJoinDefault()
public static NodeProcessor getDefault()
public static NodeProcessor getCurrentMapJoin()
public static ObjectPair<List<ReduceSinkOperator>,Map<Byte,List<ExprNodeDesc>>> getKeys(boolean leftInputJoin, String[] baseSrc, JoinOperator op)
public static MapJoinDesc getMapJoinDesc(HiveConf hconf, JoinOperator op, boolean leftInputJoin, String[] baseSrc, List<String> mapAliases, int mapJoinPos, boolean noCheckOuterJoin, boolean adjustParentsChildren) throws SemanticException
SemanticExceptionpublic static MapJoinDesc getMapJoinDesc(HiveConf hconf, JoinOperator op, boolean leftInputJoin, String[] baseSrc, List<String> mapAliases, int mapJoinPos, boolean noCheckOuterJoin) throws SemanticException
SemanticExceptionCopyright © 2019 The Apache Software Foundation. All Rights Reserved.