-
- Downloads
[SPARK-13904][SCHEDULER] Add support for pluggable cluster manager
## What changes were proposed in this pull request? This commit adds support for pluggable cluster manager. And also allows a cluster manager to clean up tasks without taking the parent process down. To plug a new external cluster manager, ExternalClusterManager trait should be implemented. It returns task scheduler and backend scheduler that will be used by SparkContext to schedule tasks. An external cluster manager is registered using the java.util.ServiceLoader mechanism (This mechanism is also being used to register data sources like parquet, json, jdbc etc.). This allows auto-loading implementations of ExternalClusterManager interface. Currently, when a driver fails, executors exit using system.exit. This does not bode well for cluster managers that would like to reuse the parent process of an executor. Hence, 1. Moving system.exit to a function that can be overriden in subclasses of CoarseGrainedExecutorBackend. 2. Added functionality of killing all the running tasks in an executor. ## How was this patch tested? ExternalClusterManagerSuite.scala was added to test this patch. Author: Hemant Bhanawat <hemant@snappydata.io> Closes #11723 from hbhanawat/pluggableScheduler.
Showing
- core/src/main/scala/org/apache/spark/SparkContext.scala 26 additions, 3 deletionscore/src/main/scala/org/apache/spark/SparkContext.scala
- core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala 12 additions, 5 deletions.../apache/spark/executor/CoarseGrainedExecutorBackend.scala
- core/src/main/scala/org/apache/spark/executor/Executor.scala 15 additions, 0 deletionscore/src/main/scala/org/apache/spark/executor/Executor.scala
- core/src/main/scala/org/apache/spark/scheduler/ExternalClusterManager.scala 65 additions, 0 deletions...a/org/apache/spark/scheduler/ExternalClusterManager.scala
- core/src/test/resources/META-INF/services/org.apache.spark.scheduler.ExternalClusterManager 1 addition, 0 deletions...ervices/org.apache.spark.scheduler.ExternalClusterManager
- core/src/test/scala/org/apache/spark/scheduler/ExternalClusterManagerSuite.scala 73 additions, 0 deletions.../apache/spark/scheduler/ExternalClusterManagerSuite.scala
- dev/.rat-excludes 1 addition, 0 deletionsdev/.rat-excludes
Loading
Please register or sign in to comment