|
||||||||||
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 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 Map<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()
This method is overridden in each Task. |
int |
executeTask()
This method is called in the Driver on every task. |
boolean |
fetch(Vector<String> res)
|
List<Task<? extends Serializable>> |
getChildTasks()
|
Map<String,Long> |
getCounters()
|
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)
|
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 |
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 Map<String,Long> taskCounters
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)
public int executeTask()
protected abstract int execute()
public void progress(TaskHandle taskHandle) throws IOException
taskHandle
- task handle returned by execute
IOException
public boolean fetch(Vector<String> res) throws IOException
IOException
public void setChildTasks(List<Task<? extends Serializable>> childTasks)
public List<Task<? extends Serializable>> getChildTasks()
public void setParentTasks(List<Task<? extends Serializable>> parentTasks)
public List<Task<? extends Serializable>> getParentTasks()
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 Map<String,Long> getCounters()
public int getType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |