|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.ql.exec.Task<T>
public abstract class Task<T extends Serializable>
Task implementation.
Field Summary | |
---|---|
protected List<Task<? extends Serializable>> |
childTasks
|
protected HiveConf |
conf
|
protected SessionState.LogHelper |
console
|
protected Hive |
db
|
protected DriverContext |
driverContext
|
protected String |
id
|
protected boolean |
initialized
|
protected boolean |
isdone
|
protected org.apache.commons.logging.Log |
LOG
|
protected List<Task<? extends Serializable>> |
parentTasks
|
protected QueryPlan |
queryPlan
|
protected boolean |
queued
|
protected boolean |
started
|
protected HashMap<String,Long> |
taskCounters
|
protected TaskHandle |
taskHandle
|
protected T |
work
|
Constructor Summary | |
---|---|
Task()
|
Method Summary | |
---|---|
boolean |
addDependentTask(Task<? extends Serializable> dependent)
Add a dependent task on the current task. |
boolean |
done()
|
protected abstract int |
execute(DriverContext driverContext)
This method is overridden in each Task. |
int |
executeTask()
This method is called in the Driver on every task. |
boolean |
fetch(ArrayList<String> res)
|
List<? extends Node> |
getChildren()
Gets the vector of children nodes. |
List<Task<? extends Serializable>> |
getChildTasks()
|
HashMap<String,Long> |
getCounters()
|
List<Task<? extends Serializable>> |
getDependentTasks()
The default dependent tasks are just child tasks, but different types could implement their own (e.g. |
String |
getId()
|
boolean |
getInitialized()
|
List<Task<? extends Serializable>> |
getParentTasks()
|
boolean |
getQueued()
|
int |
getType()
Should be overridden to return the type of the specific task among the types in TaskType. |
T |
getWork()
|
boolean |
hasReduce()
|
void |
initialize(HiveConf conf,
QueryPlan queryPlan,
DriverContext driverContext)
|
boolean |
isMapRedTask()
|
boolean |
isRunnable()
|
void |
progress(TaskHandle taskHandle)
Update the progress of the task within taskHandle and also dump the progress information to the history file. |
void |
removeDependentTask(Task<? extends Serializable> dependent)
Remove the dependent task. |
void |
setChildTasks(List<Task<? extends Serializable>> childTasks)
|
void |
setDone()
|
void |
setId(String id)
|
void |
setInitialized()
|
void |
setParentTasks(List<Task<? extends Serializable>> parentTasks)
|
void |
setQueued()
|
void |
setStarted()
|
void |
setWork(T work)
|
boolean |
started()
|
void |
updateCounters(TaskHandle th)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.hadoop.hive.ql.lib.Node |
---|
getName |
Field Detail |
---|
protected transient boolean started
protected transient boolean initialized
protected transient boolean isdone
protected transient boolean queued
protected transient HiveConf conf
protected transient Hive db
protected transient org.apache.commons.logging.Log LOG
protected transient SessionState.LogHelper console
protected transient QueryPlan queryPlan
protected transient TaskHandle taskHandle
protected transient HashMap<String,Long> taskCounters
protected transient DriverContext driverContext
protected List<Task<? extends Serializable>> childTasks
protected List<Task<? extends Serializable>> parentTasks
protected String id
protected T extends Serializable work
Constructor Detail |
---|
public Task()
Method Detail |
---|
public void initialize(HiveConf conf, QueryPlan queryPlan, DriverContext driverContext)
public int executeTask()
protected abstract int execute(DriverContext driverContext)
public void progress(TaskHandle taskHandle) throws IOException
taskHandle
- task handle returned by execute
IOException
public boolean fetch(ArrayList<String> res) throws IOException
IOException
public void setChildTasks(List<Task<? extends Serializable>> childTasks)
public List<? extends Node> getChildren()
Node
getChildren
in interface Node
public List<Task<? extends Serializable>> getChildTasks()
public void setParentTasks(List<Task<? extends Serializable>> parentTasks)
public List<Task<? extends Serializable>> getParentTasks()
public List<Task<? extends Serializable>> getDependentTasks()
public boolean addDependentTask(Task<? extends Serializable> dependent)
public void removeDependentTask(Task<? extends Serializable> dependent)
dependent
- the task to removepublic void setStarted()
public boolean started()
public boolean done()
public void setDone()
public void setQueued()
public boolean getQueued()
public void setInitialized()
public boolean getInitialized()
public boolean isRunnable()
public void setWork(T work)
public T getWork()
public void setId(String id)
public String getId()
public boolean isMapRedTask()
public boolean hasReduce()
public void updateCounters(TaskHandle th) throws IOException
IOException
public HashMap<String,Long> getCounters()
public int getType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |