[SPARK-16953] Make requestTotalExecutors public Developer API to be consistent with requestExecutors/killExecutors

## What changes were proposed in this pull request?

RequestExecutors and killExecutor are public developer APIs for managing the number of executors allocated to the SparkContext. For consistency, requestTotalExecutors should also be a public Developer API, as it provides similar functionality. In fact, using requestTotalExecutors is more convenient that requestExecutors as the former is idempotent and the latter is not.

Author: Tathagata Das <tathagata.das1565@gmail.com>

Closes #14541 from tdas/SPARK-16953.
This commit is contained in:
Tathagata Das 2016-08-08 12:52:04 -07:00
parent 1739e75fec
commit 8650239050

View file

@ -1473,7 +1473,8 @@ class SparkContext(config: SparkConf) extends Logging with ExecutorAllocationCli
* This includes running, pending, and completed tasks.
* @return whether the request is acknowledged by the cluster manager.
*/
private[spark] override def requestTotalExecutors(
@DeveloperApi
override def requestTotalExecutors(
numExecutors: Int,
localityAwareTasks: Int,
hostToLocalTaskCount: scala.collection.immutable.Map[String, Int]