Package org.apache.spark.scheduler
Interface ExternalClusterManager
public interface ExternalClusterManager
A cluster manager interface to plugin external scheduler.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Check if this cluster manager instance can create scheduler components for a certain master URL.createSchedulerBackend
(SparkContext sc, String masterURL, TaskScheduler scheduler) Create a scheduler backend for the given SparkContext and scheduler.createTaskScheduler
(SparkContext sc, String masterURL) Create a task scheduler instance for the given SparkContextvoid
initialize
(TaskScheduler scheduler, SchedulerBackend backend) Initialize task scheduler and backend scheduler.
-
Method Details
-
canCreate
Check if this cluster manager instance can create scheduler components for a certain master URL.- Parameters:
masterURL
- the master URL- Returns:
- True if the cluster manager can create scheduler backend/
-
createSchedulerBackend
Create a scheduler backend for the given SparkContext and scheduler. This is called after task scheduler is created usingExternalClusterManager.createTaskScheduler()
.- Parameters:
sc
- SparkContextmasterURL
- the master URLscheduler
- TaskScheduler that will be used with the scheduler backend.- Returns:
- SchedulerBackend that works with a TaskScheduler
-
createTaskScheduler
Create a task scheduler instance for the given SparkContext- Parameters:
sc
- SparkContextmasterURL
- the master URL- Returns:
- TaskScheduler that will be responsible for task handling
-
initialize
Initialize task scheduler and backend scheduler. This is called after the scheduler components are created- Parameters:
scheduler
- TaskScheduler that will be responsible for task handlingbackend
- SchedulerBackend that works with a TaskScheduler
-