public class TaskExecutorService extends org.apache.hadoop.service.AbstractService implements Scheduler<TaskRunnerCallable>, SchedulerFragmentCompletingListener
Modifier and Type | Class and Description |
---|---|
static class |
TaskExecutorService.PreemptionQueueComparator |
static class |
TaskExecutorService.TaskWrapper |
Scheduler.SubmissionState
SchedulerFragmentCompletingListener.State
Modifier and Type | Field and Description |
---|---|
static String |
TASK_EXECUTOR_THREAD_NAME_FORMAT_PREFIX |
Constructor and Description |
---|
TaskExecutorService(int numExecutors,
int waitQueueSize,
String waitQueueComparatorClassName,
boolean enablePreemption,
ClassLoader classLoader,
LlapDaemonExecutorMetrics metrics,
org.apache.hadoop.yarn.util.Clock clock) |
Modifier and Type | Method and Description |
---|---|
QueryIdentifier |
findQueryByFragment(String fragmentId) |
void |
fragmentCompleting(String fragmentId,
SchedulerFragmentCompletingListener.State state)
Indicates that a fragment is about to complete.
|
Set<String> |
getExecutorsStatusForReporting() |
int |
getNumActiveForReporting() |
void |
killFragment(String fragmentId)
Attempt to kill the fragment with the specified fragmentId
|
Scheduler.SubmissionState |
schedule(TaskRunnerCallable task)
Schedule the task or throw RejectedExecutionException if queues are full
|
void |
serviceStop() |
void |
setCapacity(int newNumExecutors,
int newWaitQueueSize)
Sets the TaskExecutorService capacity to the new values.
|
void |
shutDown(boolean awaitTermination) |
boolean |
updateFragment(String fragmentId,
boolean isGuaranteed) |
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceInit, serviceStart, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
public static final String TASK_EXECUTOR_THREAD_NAME_FORMAT_PREFIX
public TaskExecutorService(int numExecutors, int waitQueueSize, String waitQueueComparatorClassName, boolean enablePreemption, ClassLoader classLoader, LlapDaemonExecutorMetrics metrics, org.apache.hadoop.yarn.util.Clock clock)
public void setCapacity(int newNumExecutors, int newWaitQueueSize)
setCapacity
in interface Scheduler<TaskRunnerCallable>
newNumExecutors
- The new number of executorsnewWaitQueueSize
- The new number of wait queue sizepublic void serviceStop()
serviceStop
in class org.apache.hadoop.service.AbstractService
public int getNumActiveForReporting()
getNumActiveForReporting
in interface Scheduler<TaskRunnerCallable>
public Set<String> getExecutorsStatusForReporting()
getExecutorsStatusForReporting
in interface Scheduler<TaskRunnerCallable>
public Scheduler.SubmissionState schedule(TaskRunnerCallable task)
Scheduler
schedule
in interface Scheduler<TaskRunnerCallable>
task
- - task to schedulepublic boolean updateFragment(String fragmentId, boolean isGuaranteed)
updateFragment
in interface Scheduler<TaskRunnerCallable>
public QueryIdentifier findQueryByFragment(String fragmentId)
findQueryByFragment
in interface Scheduler<TaskRunnerCallable>
public void killFragment(String fragmentId)
Scheduler
killFragment
in interface Scheduler<TaskRunnerCallable>
public void fragmentCompleting(String fragmentId, SchedulerFragmentCompletingListener.State state)
SchedulerFragmentCompletingListener
fragmentCompleting
in interface SchedulerFragmentCompletingListener
public void shutDown(boolean awaitTermination)
Copyright © 2023 The Apache Software Foundation. All rights reserved.