Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/2840#discussion_r19167078
--- 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")
--- End diff --
Can this ever happen? Seems like `schedulerBackend` is initialized in the
constructor.
---
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]