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(HashMap<Operator<? extends Serializable>,Task<? extends Serializable>> opTaskMap,
List<Operator<? extends Serializable>> seenOps,
ParseContext parseCtx,
Task<? extends Serializable> mvTask,
List<Task<? extends Serializable>> rootTasks,
String scratchDir,
int randomid,
int pathid,
Map<Operator<? extends Serializable>,GenMRProcContext.GenMapRedCtx> mapCurrCtx)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenMRProcContext
public GenMRProcContext(HashMap<Operator<? extends Serializable>,Task<? extends Serializable>> opTaskMap,
List<Operator<? extends Serializable>> seenOps,
ParseContext parseCtx,
Task<? extends Serializable> mvTask,
List<Task<? extends Serializable>> rootTasks,
String scratchDir,
int randomid,
int pathid,
Map<Operator<? extends Serializable>,GenMRProcContext.GenMapRedCtx> mapCurrCtx)
- Parameters:
opTaskMap
- reducer to task mappingseenOps
- operator already visitedparseCtx
- current parse contextrootTasks
- root tasks for the planmvTask
- the final move taskscratchDir
- directory for temp destinationsmapCurrCtx
- operator to task mappings
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
setSeenOps
public void setSeenOps(List<Operator<? extends Serializable>> seenOps)
- Parameters:
seenOps
- 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 Task<? extends Serializable> getMvTask()
- Returns:
- the final move task
setMvTask
public void setMvTask(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
getScratchDir
public String getScratchDir()
- Returns:
- directory for temp destinations
setScratchDir
public void setScratchDir(String scratchDir)
- Parameters:
scratchDir
- directory for temp destinations
getRandomId
public int getRandomId()
- Returns:
- identifier used for temp destinations
setRandomId
public void setRandomId(int randomid)
- Parameters:
randomid
- identifier used for temp destinations
getPathId
public int getPathId()
- Returns:
- identifier used for temp destinations
setPathId
public void setPathId(int pathid)
- Parameters:
pathid
- identifier used for temp destinations
getMapCurrCtx
public Map<Operator<? extends Serializable>,GenMRProcContext.GenMapRedCtx> getMapCurrCtx()
- Returns:
- operator to task mappings
setMapCurrCtx
public void setMapCurrCtx(Map<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
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)
Copyright © 2009 The Apache Software Foundation