Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/2840#discussion_r19167091
  
    --- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
    @@ -856,6 +857,32 @@ class SparkContext(config: SparkConf) extends Logging {
         listenerBus.addListener(listener)
       }
     
    +  /**
    +   * :: DeveloperApi ::
    +   * Request a number of executors from the cluster manager.
    +   */
    +  @DeveloperApi
    +  def requestExecutors(numExecutors: Int): Unit = {
    +    schedulerBackend match {
    +      case b: CoarseGrainedSchedulerBackend => 
b.requestExecutors(numExecutors)
    +      case null => logWarning("Attempted to request executors before 
initializing the backend")
    +      case _ => logWarning("Requesting executors is only supported in 
coarse-grained mode")
    +    }
    +  }
    +
    +  /**
    +   * :: DeveloperApi ::
    +   * Request the cluster manager to kill the specified executors.
    +   */
    +  @DeveloperApi
    +  def killExecutors(executorIds: Seq[String]): Unit = {
    +    schedulerBackend match {
    +      case b: CoarseGrainedSchedulerBackend => b.killExecutors(executorIds)
    +      case null => logWarning("Attempted to kill executors before 
initializing the backend")
    --- End diff --
    
    Same.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to