All Downloads are FREE. Search and download functionalities are using the official Maven repository.

spark.scheduler.cluster.SchedulerBackend.scala Maven / Gradle / Ivy

package spark.scheduler.cluster

import spark.{SparkContext, Utils}

/**
 * A backend interface for cluster scheduling systems that allows plugging in different ones under
 * ClusterScheduler. We assume a Mesos-like model where the application gets resource offers as
 * machines become available and can launch tasks on them.
 */
private[spark] trait SchedulerBackend {
  def start(): Unit
  def stop(): Unit
  def reviveOffers(): Unit
  def defaultParallelism(): Int

  // Memory used by each executor (in megabytes)
  protected val executorMemory: Int = SparkContext.executorMemoryRequested

  // TODO: Probably want to add a killTask too
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy