org.apache.hadoop.hive.ql.exec
Class ConditionalTask
java.lang.Object
org.apache.hadoop.hive.ql.exec.Task<ConditionalWork>
org.apache.hadoop.hive.ql.exec.ConditionalTask
- All Implemented Interfaces:
- Serializable, Node
public class ConditionalTask
- extends Task<ConditionalWork>
- implements Serializable
Conditional Task implementation.
- See Also:
- Serialized Form
Fields inherited from class org.apache.hadoop.hive.ql.exec.Task |
childTasks, conf, console, db, driverContext, id, initialized, isdone, LOG, parentTasks, queryPlan, queued, started, taskCounters, taskHandle, work |
Methods inherited from class org.apache.hadoop.hive.ql.exec.Task |
executeTask, fetch, getChildren, getChildTasks, getCounters, getDependentTasks, getId, getInitialized, getParentTasks, getQueued, getWork, isRunnable, progress, removeDependentTask, setChildTasks, setDone, setId, setInitialized, setParentTasks, setQueued, setStarted, setWork, started, updateCounters |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConditionalTask
public ConditionalTask()
isMapRedTask
public boolean isMapRedTask()
- Overrides:
isMapRedTask
in class Task<ConditionalWork>
hasReduce
public boolean hasReduce()
- Overrides:
hasReduce
in class Task<ConditionalWork>
initialize
public void initialize(HiveConf conf,
QueryPlan queryPlan,
DriverContext driverContext)
- Overrides:
initialize
in class Task<ConditionalWork>
execute
public int execute(DriverContext driverContext)
- Description copied from class:
Task
- This method is overridden in each Task. TODO execute should return a
TaskHandle.
- Specified by:
execute
in class Task<ConditionalWork>
- Returns:
- status of executing the task
getResolver
public ConditionalResolver getResolver()
- Returns:
- the resolver
setResolver
public void setResolver(ConditionalResolver resolver)
- Parameters:
resolver
- the resolver to set
getResolverCtx
public Object getResolverCtx()
- Returns:
- the resolverCtx
done
public boolean done()
- Overrides:
done
in class Task<ConditionalWork>
setResolverCtx
public void setResolverCtx(Object resolverCtx)
- Parameters:
resolverCtx
- the resolverCtx to set
getListTasks
public List<Task<? extends Serializable>> getListTasks()
- Returns:
- the listTasks
setListTasks
public void setListTasks(List<Task<? extends Serializable>> listTasks)
- Parameters:
listTasks
- the listTasks to set
getType
public int getType()
- Description copied from class:
Task
- Should be overridden to return the type of the specific task among the
types in TaskType.
- Overrides:
getType
in class Task<ConditionalWork>
- Returns:
- TaskTypeType.* or -1 if not overridden
getName
public String getName()
- Description copied from interface:
Node
- Gets the name of the node. This is used in the rule dispatchers.
- Specified by:
getName
in interface Node
- Returns:
- String
addDependentTask
public boolean addDependentTask(Task<? extends Serializable> dependent)
- Add a dependent task on the current conditional task. The task will not be
a direct child of conditional task. Actually it will be added as child task
of associated tasks.
- Overrides:
addDependentTask
in class Task<ConditionalWork>
- Returns:
- true if the task got added false if it already existed
Copyright © 2010 The Apache Software Foundation