public class TaskQueue extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
addToRunnable(Task<?> tsk) |
void |
finished(TaskRunner runner) |
int |
getCurJobNo() |
Task<?> |
getRunnable(int maxthreads) |
void |
incCurJobNo(int amount) |
static boolean |
isLaunchable(Task<?> tsk)
Checks if a task can be launched.
|
boolean |
isRunning() |
boolean |
isShutdown() |
void |
launching(TaskRunner runner) |
TaskRunner |
pollFinished()
Polls running tasks to see if a task has ended.
|
void |
prepare(QueryPlan plan) |
void |
releaseRunnable() |
void |
remove(Task<?> task) |
void |
shutdown()
Cleans up remaining tasks in case of failure.
|
public TaskQueue()
public TaskQueue(Context ctx)
public boolean isShutdown()
public boolean isRunning()
public void remove(Task<?> task)
public void launching(TaskRunner runner) throws HiveException
HiveException
public Task<?> getRunnable(int maxthreads) throws HiveException
HiveException
public void releaseRunnable()
public TaskRunner pollFinished() throws InterruptedException
InterruptedException
public void shutdown()
public static boolean isLaunchable(Task<?> tsk)
tsk
- the task to be checkedpublic boolean addToRunnable(Task<?> tsk) throws HiveException
HiveException
public int getCurJobNo()
public void incCurJobNo(int amount)
public void prepare(QueryPlan plan)
public void finished(TaskRunner runner)
Copyright © 2022 The Apache Software Foundation. All rights reserved.