Ngone51 commented on a change in pull request #27773: [SPARK-29154][CORE]
Update Spark scheduler for stage level scheduling
URL: https://github.com/apache/spark/pull/27773#discussion_r393417188
##########
File path: core/src/main/scala/org/apache/spark/rdd/RDD.scala
##########
@@ -1716,11 +1717,37 @@ abstract class RDD[T: ClassTag](
@Since("2.4.0")
def barrier(): RDDBarrier[T] = withScope(new RDDBarrier[T](this))
+ /**
+ * Specify a ResourceProfile to use when calculating this RDD. This is only
supported on
+ * certain cluster managers and currently requires dynamic allocation to be
enabled.
+ * It will result in new executors with the resources specified being
acquired to
+ * calculate the RDD.
+ */
+ // PRIVATE for now, added for testing purposes, will be made public with
SPARK-29150
+ @Experimental
+ @Since("3.0.0")
+ private[spark] def withResources(rp: ResourceProfile): this.type = {
+ resourceProfile = Some(rp)
Review comment:
Maybe, `Option(rp)`? In case of a `null` input.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]