org.apache.hadoop.hive.ql.optimizer
Class GenMRProcContext
java.lang.Object
org.apache.hadoop.hive.ql.optimizer.GenMRProcContext
- All Implemented Interfaces:
- NodeProcessorCtx
public class GenMRProcContext
- extends Object
- implements NodeProcessorCtx
Processor Context for creating map reduce task. Walk the tree in a DFS manner
and process the nodes. Some state is maintained about the current nodes
visited so far.
|
Constructor Summary |
GenMRProcContext()
|
GenMRProcContext(HiveConf conf,
HashMap<Operator<? extends Serializable>,Task<? extends Serializable>> opTaskMap,
List<Operator<? extends Serializable>> seenOps,
ParseContext parseCtx,
List<Task<? extends Serializable>> mvTask,
List<Task<? extends Serializable>> rootTasks,
LinkedHashMap<Operator<? extends Serializable>,GenMRProcContext.GenMapRedCtx> mapCurrCtx,
Set<ReadEntity> inputs,
Set<WriteEntity> outputs)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenMRProcContext
public GenMRProcContext()
GenMRProcContext
public GenMRProcContext(HiveConf conf,
HashMap<Operator<? extends Serializable>,Task<? extends Serializable>> opTaskMap,
List<Operator<? extends Serializable>> seenOps,
ParseContext parseCtx,
List<Task<? extends Serializable>> mvTask,
List<Task<? extends Serializable>> rootTasks,
LinkedHashMap<Operator<? extends Serializable>,GenMRProcContext.GenMapRedCtx> mapCurrCtx,
Set<ReadEntity> inputs,
Set<WriteEntity> outputs)
- Parameters:
conf - hive configurationopTaskMap - reducer to task mappingseenOps - operator already visitedparseCtx - current parse contextrootTasks - root tasks for the planmvTask - the final move taskmapCurrCtx - operator to task mappingsinputs - the set of input tables/partitions generated by the walkoutputs - the set of destinations generated by the walk
getOpTaskMap
public HashMap<Operator<? extends Serializable>,Task<? extends Serializable>> getOpTaskMap()
- Returns:
- reducer to task mapping
setOpTaskMap
public void setOpTaskMap(HashMap<Operator<? extends Serializable>,Task<? extends Serializable>> opTaskMap)
- Parameters:
opTaskMap - reducer to task mapping
getSeenOps
public List<Operator<? extends Serializable>> getSeenOps()
- Returns:
- operators already visited
getSeenFileSinkOps
public List<FileSinkOperator> getSeenFileSinkOps()
- Returns:
- file operators already visited
setSeenOps
public void setSeenOps(List<Operator<? extends Serializable>> seenOps)
- Parameters:
seenOps - operators already visited
setSeenFileSinkOps
public void setSeenFileSinkOps(List<FileSinkOperator> seenFileSinkOps)
- Parameters:
seenFileSinkOps - file sink operators already visited
getRootOps
public List<Operator<? extends Serializable>> getRootOps()
- Returns:
- top operators for tasks
setRootOps
public void setRootOps(List<Operator<? extends Serializable>> rootOps)
- Parameters:
rootOps - top operators for tasks
getParseCtx
public ParseContext getParseCtx()
- Returns:
- current parse context
setParseCtx
public void setParseCtx(ParseContext parseCtx)
- Parameters:
parseCtx - current parse context
getMvTask
public List<Task<? extends Serializable>> getMvTask()
- Returns:
- the final move task
setMvTask
public void setMvTask(List<Task<? extends Serializable>> mvTask)
- Parameters:
mvTask - the final move task
getRootTasks
public List<Task<? extends Serializable>> getRootTasks()
- Returns:
- root tasks for the plan
setRootTasks
public void setRootTasks(List<Task<? extends Serializable>> rootTasks)
- Parameters:
rootTasks - root tasks for the plan
getMapCurrCtx
public LinkedHashMap<Operator<? extends Serializable>,GenMRProcContext.GenMapRedCtx> getMapCurrCtx()
- Returns:
- operator to task mappings
setMapCurrCtx
public void setMapCurrCtx(LinkedHashMap<Operator<? extends Serializable>,GenMRProcContext.GenMapRedCtx> mapCurrCtx)
- Parameters:
mapCurrCtx - operator to task mappings
getCurrTask
public Task<? extends Serializable> getCurrTask()
- Returns:
- current task
setCurrTask
public void setCurrTask(Task<? extends Serializable> currTask)
- Parameters:
currTask - current task
getCurrTopOp
public Operator<? extends Serializable> getCurrTopOp()
- Returns:
- current top operator
setCurrTopOp
public void setCurrTopOp(Operator<? extends Serializable> currTopOp)
- Parameters:
currTopOp - current top operator
getCurrUnionOp
public UnionOperator getCurrUnionOp()
setCurrUnionOp
public void setCurrUnionOp(UnionOperator currUnionOp)
- Parameters:
currUnionOp - current union operator
getCurrMapJoinOp
public AbstractMapJoinOperator<? extends MapJoinDesc> getCurrMapJoinOp()
setCurrMapJoinOp
public void setCurrMapJoinOp(AbstractMapJoinOperator<? extends MapJoinDesc> currMapJoinOp)
- Parameters:
currMapJoinOp - current map join operator
getCurrAliasId
public String getCurrAliasId()
- Returns:
- current top alias
setCurrAliasId
public void setCurrAliasId(String currAliasId)
- Parameters:
currAliasId - current top alias
getUnionTask
public GenMRProcContext.GenMRUnionCtx getUnionTask(UnionOperator op)
setUnionTask
public void setUnionTask(UnionOperator op,
GenMRProcContext.GenMRUnionCtx uTask)
getMapJoinCtx
public GenMRProcContext.GenMRMapJoinCtx getMapJoinCtx(AbstractMapJoinOperator<? extends MapJoinDesc> op)
setMapJoinCtx
public void setMapJoinCtx(AbstractMapJoinOperator<? extends MapJoinDesc> op,
GenMRProcContext.GenMRMapJoinCtx mjCtx)
getInputs
public Set<ReadEntity> getInputs()
- Get the input set.
getOutputs
public Set<WriteEntity> getOutputs()
- Get the output set.
getConf
public HiveConf getConf()
- Returns:
- the conf
setConf
public void setConf(HiveConf conf)
- Parameters:
conf - the conf to set
Copyright © 2013 The Apache Software Foundation