public abstract class Task<T extends Serializable> extends Object implements Serializable, Node
| Modifier and Type | Class and Description |
|---|---|
static class |
Task.FeedType |
static class |
Task.TaskState
Order of the States here is important as the ordinal values are used
determine the progression of taskState over its lifeCycle which is then
used to make some decisions in Driver.execute
|
| Modifier and Type | Field and Description |
|---|---|
static int |
BACKUP_COMMON_JOIN |
protected List<Task<?>> |
backupChildrenTasks |
protected Task<?> |
backupTask |
protected List<Task<?>> |
childTasks |
protected boolean |
clonedConf |
static int |
COMMON_JOIN |
protected HiveConf |
conf |
protected SessionState.LogHelper |
console |
protected Context |
context |
static int |
CONVERTED_MAPJOIN |
static int |
CONVERTED_MAPJOIN_LOCAL |
static int |
CONVERTED_SORTMERGEJOIN |
protected DeferredWorkContext |
deferredWorkContext |
protected List<Task<?>> |
feedSubscribers |
static int |
HINTED_MAPJOIN |
static int |
HINTED_MAPJOIN_LOCAL |
protected String |
id |
protected String |
jobID |
protected static org.slf4j.Logger |
LOG |
static int |
MAPJOIN_ONLY_NOBACKUP |
static int |
NO_TAG |
protected List<Task<?>> |
parentTasks |
QueryDisplay |
queryDisplay |
protected QueryPlan |
queryPlan |
protected QueryState |
queryState |
protected boolean |
rootTask |
HashMap<String,Long> |
taskCounters |
TaskHandle |
taskHandle |
protected TaskQueue |
taskQueue |
protected int |
taskTag |
protected T |
work |
| Constructor and Description |
|---|
Task() |
public transient TaskHandle taskHandle
protected transient HiveConf conf
protected transient QueryState queryState
protected transient SessionState.LogHelper console
protected transient QueryPlan queryPlan
protected transient TaskQueue taskQueue
protected transient Context context
protected transient boolean clonedConf
protected transient String jobID
protected Task<?> backupTask
protected static transient org.slf4j.Logger LOG
protected int taskTag
protected DeferredWorkContext deferredWorkContext
public static final int NO_TAG
public static final int COMMON_JOIN
public static final int HINTED_MAPJOIN
public static final int HINTED_MAPJOIN_LOCAL
public static final int CONVERTED_MAPJOIN
public static final int CONVERTED_MAPJOIN_LOCAL
public static final int BACKUP_COMMON_JOIN
public static final int MAPJOIN_ONLY_NOBACKUP
public static final int CONVERTED_SORTMERGEJOIN
public QueryDisplay queryDisplay
protected String id
protected T extends Serializable work
protected boolean rootTask
public void setDiagnosticMessage(String diagnosticMesg)
public String getDiagnosticsMessage()
public void setStatusMessage(String statusMessage)
public String getStatusMessage()
public TaskHandle getTaskHandle()
public void initialize(QueryState queryState, QueryPlan queryPlan, TaskQueue taskQueue, Context context)
public void setQueryDisplay(QueryDisplay queryDisplay)
protected void updateStatusInQueryDisplay()
protected void setState(Task.TaskState state)
protected Hive getHive()
public int executeTask(HiveHistory hiveHistory)
public abstract int execute()
public boolean isRootTask()
public void setRootTask(boolean rootTask)
public List<? extends Node> getChildren()
getChildren in interface Nodepublic int getNumChild()
public int getNumParent()
public Task<?> getBackupTask()
public void setBackupTask(Task<?> backupTask)
public Task<?> getAndInitBackupTask()
public void removeFromChildrenTasks()
public List<Task<?>> getDependentTasks()
public boolean addDependentTask(Task<?> dependent)
public void removeDependentTask(Task<?> 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 isNotInitialized()
public boolean isRunnable()
public void setConf(HiveConf conf)
public HiveConf getConf()
public void setWork(T work)
public T getWork()
public Collection<MapWork> getMapWork()
public void setId(String id)
public String getId()
public String getExternalHandle()
public Task.TaskState getTaskState()
public boolean isMapRedTask()
public boolean isMapRedLocalTask()
public Collection<Operator<? extends OperatorDesc>> getTopOperators()
public boolean hasReduce()
public Operator<? extends OperatorDesc> getReducer(MapWork work)
public abstract StageType getType()
public void subscribeFeed(Task<?> publisher)
publisher - this feed provider.protected void pushFeed(Task.FeedType feedType, Object feedValue)
protected void receiveFeed(Task.FeedType feedType, Object feedValue)
protected void cloneConf()
public void updateTaskMetrics(org.apache.hadoop.hive.common.metrics.common.Metrics metrics)
metrics - public int getTaskTag()
public void setTaskTag(int taskTag)
public boolean isLocalMode()
public void setLocalMode(boolean isLocalMode)
public boolean requireLock()
public QueryPlan getQueryPlan()
public TaskQueue getTaskQueue()
public void setTaskQueue(TaskQueue taskQueue)
public Context getContext()
public void setQueryPlan(QueryPlan queryPlan)
public String getJobID()
public void shutdown()
public Throwable getException()
public void setException(Throwable ex)
public void setConsole(SessionState.LogHelper console)
public boolean isFetchSource()
public void setFetchSource(boolean fetchSource)
public DeferredWorkContext getDeferredWorkContext()
public void setDeferredWorkContext(DeferredWorkContext deferredWorkContext)
public boolean canExecuteInParallel()
public QueryState getQueryState()
public HiveTxnManager getTxnMgr()
Copyright © 2022 The Apache Software Foundation. All rights reserved.