|
||||||||||
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.
Nested Class Summary | |
---|---|
static class |
Task.FeedType
|
Field Summary | |
---|---|
static int |
BACKUP_COMMON_JOIN
|
protected List<Task<? extends Serializable>> |
backupChildrenTasks
|
protected Task<? extends Serializable> |
backupTask
|
protected List<Task<? extends Serializable>> |
childTasks
|
protected boolean |
clonedConf
|
static int |
COMMON_JOIN
|
protected HiveConf |
conf
|
protected SessionState.LogHelper |
console
|
static int |
CONVERTED_LOCAL_MAPJOIN
|
static int |
CONVERTED_MAPJOIN
|
protected Hive |
db
|
protected DriverContext |
driverContext
|
protected List<Task<? extends Serializable>> |
feedSubscribers
|
protected String |
id
|
protected boolean |
initialized
|
protected boolean |
isdone
|
protected String |
jobID
|
static int |
LOCAL_MAPJOIN
|
protected static org.apache.commons.logging.Log |
LOG
|
static int |
NO_TAG
|
protected List<Task<? extends Serializable>> |
parentTasks
|
protected QueryPlan |
queryPlan
|
protected boolean |
queued
|
protected boolean |
started
|
protected HashMap<String,Long> |
taskCounters
|
protected TaskHandle |
taskHandle
|
protected int |
taskTag
|
protected T |
work
|
Constructor Summary | |
---|---|
Task()
|
Method Summary | |
---|---|
boolean |
addDependentTask(Task<? extends Serializable> dependent)
Add a dependent task on the current task. |
protected void |
cloneConf()
|
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)
|
Task<? extends Serializable> |
getAndInitBackupTask()
|
List<Task<? extends Serializable>> |
getBackupChildrenTasks()
|
Task<? extends Serializable> |
getBackupTask()
|
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. |
List<Task<? extends Serializable>> |
getFeedSubscribers()
|
String |
getId()
|
boolean |
getInitialized()
|
String |
getJobID()
|
List<Task<? extends Serializable>> |
getParentTasks()
|
QueryPlan |
getQueryPlan()
|
boolean |
getQueued()
|
Operator<? extends OperatorDesc> |
getReducer()
|
List<FieldSchema> |
getResultSchema()
|
int |
getTaskTag()
|
Collection<Operator<? extends OperatorDesc>> |
getTopOperators()
|
abstract StageType |
getType()
Should be overridden to return the type of the specific task among the types in StageType. |
T |
getWork()
|
boolean |
hasReduce()
|
boolean |
ifRetryCmdWhenFail()
|
void |
initialize(HiveConf conf,
QueryPlan queryPlan,
DriverContext driverContext)
|
boolean |
isLocalMode()
|
boolean |
isMapRedLocalTask()
|
boolean |
isMapRedTask()
|
boolean |
isRunnable()
|
void |
localizeMRTmpFiles(Context ctx)
Localize a task tree |
protected abstract void |
localizeMRTmpFilesImpl(Context ctx)
If this task uses any map-reduce intermediate data (either for reading or for writing), localize them (using the supplied Context). |
protected void |
pushFeed(Task.FeedType feedType,
Object feedValue)
|
protected void |
receiveFeed(Task.FeedType feedType,
Object feedValue)
|
void |
removeDependentTask(Task<? extends Serializable> dependent)
Remove the dependent task. |
void |
removeFromChildrenTasks()
|
boolean |
requireLock()
|
void |
setBackupChildrenTasks(List<Task<? extends Serializable>> backupChildrenTasks)
|
void |
setBackupTask(Task<? extends Serializable> backupTask)
|
void |
setChildTasks(List<Task<? extends Serializable>> childTasks)
|
void |
setDone()
|
void |
setFeedSubscribers(List<Task<? extends Serializable>> s)
|
void |
setId(String id)
|
void |
setInitialized()
|
void |
setLocalMode(boolean isLocalMode)
|
void |
setParentTasks(List<Task<? extends Serializable>> parentTasks)
|
void |
setQueryPlan(QueryPlan queryPlan)
|
void |
setQueued()
|
void |
setRetryCmdWhenFail(boolean retryCmdWhenFail)
|
void |
setStarted()
|
void |
setTaskTag(int taskTag)
|
void |
setWork(T work)
|
boolean |
started()
|
void |
subscribeFeed(Task<? extends Serializable> publisher)
Subscribe the feed of publisher. |
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 SessionState.LogHelper console
protected transient QueryPlan queryPlan
protected transient TaskHandle taskHandle
protected transient HashMap<String,Long> taskCounters
protected transient DriverContext driverContext
protected transient boolean clonedConf
protected transient String jobID
protected Task<? extends Serializable> backupTask
protected List<Task<? extends Serializable>> backupChildrenTasks
protected static transient org.apache.commons.logging.Log LOG
protected int taskTag
public static final int NO_TAG
public static final int COMMON_JOIN
public static final int CONVERTED_MAPJOIN
public static final int CONVERTED_LOCAL_MAPJOIN
public static final int BACKUP_COMMON_JOIN
public static final int LOCAL_MAPJOIN
protected transient List<Task<? extends Serializable>> feedSubscribers
protected String id
protected T extends Serializable work
protected List<Task<? extends Serializable>> childTasks
protected List<Task<? extends Serializable>> parentTasks
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 boolean fetch(ArrayList<String> res) throws IOException, CommandNeedRetryException
IOException
CommandNeedRetryException
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 Task<? extends Serializable> getBackupTask()
public void setBackupTask(Task<? extends Serializable> backupTask)
public List<Task<? extends Serializable>> getBackupChildrenTasks()
public void setBackupChildrenTasks(List<Task<? extends Serializable>> backupChildrenTasks)
public Task<? extends Serializable> getAndInitBackupTask()
public void removeFromChildrenTasks()
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 isMapRedLocalTask()
public Collection<Operator<? extends OperatorDesc>> getTopOperators()
public boolean hasReduce()
public Operator<? extends OperatorDesc> getReducer()
public HashMap<String,Long> getCounters()
public abstract StageType getType()
protected abstract void localizeMRTmpFilesImpl(Context ctx)
ctx
- context object with which to localizepublic final void localizeMRTmpFiles(Context ctx)
ctx
- context object with which to localizepublic void subscribeFeed(Task<? extends Serializable> publisher)
publisher
- this feed provider.public List<Task<? extends Serializable>> getFeedSubscribers()
public void setFeedSubscribers(List<Task<? extends Serializable>> s)
protected void pushFeed(Task.FeedType feedType, Object feedValue)
protected void receiveFeed(Task.FeedType feedType, Object feedValue)
protected void cloneConf()
public int getTaskTag()
public void setTaskTag(int taskTag)
public boolean isLocalMode()
public void setLocalMode(boolean isLocalMode)
public boolean requireLock()
public boolean ifRetryCmdWhenFail()
public void setRetryCmdWhenFail(boolean retryCmdWhenFail)
public QueryPlan getQueryPlan()
public void setQueryPlan(QueryPlan queryPlan)
public String getJobID()
public List<FieldSchema> getResultSchema()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |