Package org.apache.spark.scheduler
Interface SchedulerBackend
public interface SchedulerBackend
A backend interface for scheduling systems that allows plugging in different ones under
 TaskSchedulerImpl. We assume a model where the application gets resource offers as
 machines become available and can launch tasks on them.
- 
Method SummaryModifier and TypeMethodDescriptionscala.Option<String>Get the attempt ID for this run, if the cluster manager supports multiple attempts.Get an application ID associated with the job.intGet the attributes on driver.Get the URLs for the driver logs.scala.collection.immutable.Seq<BlockManagerId>getShufflePushMergerLocations(int numPartitions, int resourceProfileId) Get the list of host locations for push based shufflescala.Option<ThreadStackTrace>getTaskThreadDump(long taskId, String executorId) booleanisReady()voidRequests that an executor kills a running task.intGet the max number of tasks that can be concurrent launched based on the ResourceProfile could be used, even if some of them are being used at the moment.voidUpdate the current offers and schedule tasksvoidstart()voidstop()voidstop(int exitCode) voidupdateExecutorsLogLevel(String logLevel) 
- 
Method Details- 
applicationAttemptIdscala.Option<String> applicationAttemptId()Get the attempt ID for this run, if the cluster manager supports multiple attempts. Applications run in client mode will not have attempt IDs.- Returns:
- The application attempt id, if available.
 
- 
applicationIdString applicationId()Get an application ID associated with the job.- Returns:
- An application ID
 
- 
defaultParallelismint defaultParallelism()
- 
getDriverAttributesGet the attributes on driver. These attributes are used to replace log URLs when custom log url pattern is specified.- Returns:
- Map containing attributes on driver.
 
- 
getDriverLogUrlsGet the URLs for the driver logs. These URLs are used to display the links in the UI Executors tab for the driver.- Returns:
- Map containing the log names and their respective URLs
 
- 
getShufflePushMergerLocationsscala.collection.immutable.Seq<BlockManagerId> getShufflePushMergerLocations(int numPartitions, int resourceProfileId) Get the list of host locations for push based shuffleCurrently push based shuffle is disabled for both stage retry and stage reuse cases (for eg: in the case where few partitions are lost due to failure). Hence this method should be invoked only once for a ShuffleDependency. - Parameters:
- numPartitions- (undocumented)
- resourceProfileId- (undocumented)
- Returns:
- List of external shuffle services locations
 
- 
getTaskThreadDump
- 
isReadyboolean isReady()
- 
killTaskRequests that an executor kills a running task.- Parameters:
- taskId- Id of the task.
- executorId- Id of the executor the task is running on.
- interruptThread- Whether the executor should interrupt the task thread.
- reason- The reason for the task kill.
 
- 
maxNumConcurrentTasksGet the max number of tasks that can be concurrent launched based on the ResourceProfile could be used, even if some of them are being used at the moment. Note that please don't cache the value returned by this method, because the number can change due to add/remove executors.- Parameters:
- rp- ResourceProfile which to use to calculate max concurrent tasks.
- Returns:
- The max number of tasks that can be concurrent launched currently.
 
- 
reviveOffersvoid reviveOffers()Update the current offers and schedule tasks
- 
startvoid start()
- 
stopvoid stop()
- 
stopvoid stop(int exitCode) 
- 
updateExecutorsLogLevel
 
-