tgravescs commented on a change in pull request #27773:
URL: https://github.com/apache/spark/pull/27773#discussion_r411434366
##########
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")
Review comment:
these will be fixed with SPARK-29150
##########
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 = Option(rp)
+ sc.resourceProfileManager.addResourceProfile(resourceProfile.get)
+ this
+ }
+
+ /**
+ * Get the ResourceProfile specified with this RDD or null if it wasn't
specified.
+ * @return the user specified ResourceProfile or null (for Java
compatibility) if
+ * none was specified
+ */
+ // PRIVATE for now, added for testing purposes, will be made public with
SPARK-29150
+ @Experimental
+ @Since("3.0.0")
Review comment:
these will be fixed with SPARK-29150
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]