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, endPerfLogging
public 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
- SemanticException
public static void genLocalWorkForMapJoin(MapredWork newWork, MapJoinOperator newMapJoinOp, int mapJoinPos) throws SemanticException
SemanticException
public 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
- SemanticException
public static MapJoinOperator convertJoinOpMapJoinOp(HiveConf hconf, JoinOperator op, boolean leftInputJoin, String[] baseSrc, List<String> mapAliases, int mapJoinPos, boolean noCheckOuterJoin) throws SemanticException
SemanticException
public static MapJoinOperator convertJoinOpMapJoinOp(HiveConf hconf, JoinOperator op, boolean leftInputJoin, String[] baseSrc, List<String> mapAliases, int mapJoinPos, boolean noCheckOuterJoin, boolean adjustParentsChildren) throws SemanticException
SemanticException
public 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
- SemanticException
public MapJoinOperator generateMapJoinOperator(ParseContext pctx, JoinOperator op, int mapJoinPos) throws SemanticException
SemanticException
public 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
SemanticException
public ParseContext transform(ParseContext pactx) throws SemanticException
transform
in class Transform
pactx
- current parse contextSemanticException
public 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
SemanticException
public static MapJoinDesc getMapJoinDesc(HiveConf hconf, JoinOperator op, boolean leftInputJoin, String[] baseSrc, List<String> mapAliases, int mapJoinPos, boolean noCheckOuterJoin) throws SemanticException
SemanticException
Copyright © 2016 The Apache Software Foundation. All rights reserved.