@@ -42,7 +42,6 @@ import org.apache.hadoop.mapred.{FileInputFormat, InputFormat, JobConf, Sequence
4242 TextInputFormat }
4343import org .apache .hadoop .mapreduce .{InputFormat => NewInputFormat , Job => NewHadoopJob }
4444import org .apache .hadoop .mapreduce .lib .input .{FileInputFormat => NewFileInputFormat }
45- import org .apache .mesos .MesosNativeLibrary
4645
4746import org .apache .spark .annotation .DeveloperApi
4847import org .apache .spark .broadcast .Broadcast
@@ -56,7 +55,6 @@ import org.apache.spark.rdd._
5655import org .apache .spark .rpc .RpcEndpointRef
5756import org .apache .spark .scheduler ._
5857import org .apache .spark .scheduler .cluster .{CoarseGrainedSchedulerBackend , StandaloneSchedulerBackend }
59- import org .apache .spark .scheduler .cluster .mesos .{MesosCoarseGrainedSchedulerBackend , MesosFineGrainedSchedulerBackend }
6058import org .apache .spark .scheduler .local .LocalSchedulerBackend
6159import org .apache .spark .storage ._
6260import org .apache .spark .storage .BlockManagerMessages .TriggerThreadDump
@@ -2512,18 +2510,6 @@ object SparkContext extends Logging {
25122510 }
25132511 (backend, scheduler)
25142512
2515- case MESOS_REGEX (mesosUrl) =>
2516- MesosNativeLibrary .load()
2517- val scheduler = new TaskSchedulerImpl (sc)
2518- val coarseGrained = sc.conf.getBoolean(" spark.mesos.coarse" , defaultValue = true )
2519- val backend = if (coarseGrained) {
2520- new MesosCoarseGrainedSchedulerBackend (scheduler, sc, mesosUrl, sc.env.securityManager)
2521- } else {
2522- new MesosFineGrainedSchedulerBackend (scheduler, sc, mesosUrl)
2523- }
2524- scheduler.initialize(backend)
2525- (backend, scheduler)
2526-
25272513 case masterUrl =>
25282514 val cm = getClusterManager(masterUrl) match {
25292515 case Some (clusterMgr) => clusterMgr
@@ -2545,7 +2531,7 @@ object SparkContext extends Logging {
25452531 private def getClusterManager (url : String ): Option [ExternalClusterManager ] = {
25462532 val loader = Utils .getContextOrSparkClassLoader
25472533 val serviceLoaders =
2548- ServiceLoader .load(classOf [ExternalClusterManager ], loader).asScala.filter(_.canCreate(url))
2534+ ServiceLoader .load(classOf [ExternalClusterManager ], loader).asScala.filter(_.canCreate(url))
25492535 if (serviceLoaders.size > 1 ) {
25502536 throw new SparkException (s " Multiple Cluster Managers ( $serviceLoaders) registered " +
25512537 s " for the url $url: " )
@@ -2566,8 +2552,6 @@ private object SparkMasterRegex {
25662552 val LOCAL_CLUSTER_REGEX = """ local-cluster\[\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*]""" .r
25672553 // Regular expression for connecting to Spark deploy clusters
25682554 val SPARK_REGEX = """ spark://(.*)""" .r
2569- // Regular expression for connection to Mesos cluster by mesos:// or mesos://zk:// url
2570- val MESOS_REGEX = """ mesos://(.*)""" .r
25712555}
25722556
25732557/**
0 commit comments