org.apache.hadoop.hive.ql.exec
Class Task<T extends Serializable>
java.lang.Object
org.apache.hadoop.hive.ql.exec.Task<T>
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- CopyTask, DDLTask, ExecDriver, ExplainTask, FetchTask, FunctionTask, MapRedTask, MoveTask
public abstract class Task<T extends Serializable>
- extends Object
- implements Serializable
Task implementation
- See Also:
- Serialized Form
Constructor Summary |
Task()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
conf
protected transient HiveConf conf
db
protected transient Hive db
LOG
protected transient org.apache.commons.logging.Log LOG
console
protected transient SessionState.LogHelper console
childTasks
protected List<Task<? extends Serializable>> childTasks
parentTasks
protected List<Task<? extends Serializable>> parentTasks
id
protected String id
work
protected T extends Serializable work
Task
public Task()
initialize
public void initialize(HiveConf conf)
execute
public abstract int execute()
fetch
public boolean fetch(Vector<String> res)
setChildTasks
public void setChildTasks(List<Task<? extends Serializable>> childTasks)
getChildTasks
public List<Task<? extends Serializable>> getChildTasks()
setParentTasks
public void setParentTasks(List<Task<? extends Serializable>> parentTasks)
getParentTasks
public List<Task<? extends Serializable>> getParentTasks()
addDependentTask
public boolean addDependentTask(Task<? extends Serializable> dependent)
- Add a dependent task on the current task. Return if the dependency already existed or is this a new one
- Returns:
- true if the task got added false if it already existed
removeDependentTask
public void removeDependentTask(Task<? extends Serializable> dependent)
- remove the dependent task
- Parameters:
dependent
- the task to remove
done
public boolean done()
setDone
public void setDone()
isRunnable
public boolean isRunnable()
setWork
public void setWork(T work)
getWork
public T getWork()
setId
public void setId(String id)
getId
public String getId()
isMapRedTask
public boolean isMapRedTask()
hasReduce
public boolean hasReduce()
Copyright © 2009 The Apache Software Foundation