HyukjinKwon commented on a change in pull request #28085: 
[SPARK-29641][PYTHON][CORE] Stage Level Sched: Add python api's and tests
URL: https://github.com/apache/spark/pull/28085#discussion_r403648497
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/api/java/JavaRDD.scala
 ##########
 @@ -49,6 +50,20 @@ class JavaRDD[T](val rdd: RDD[T])(implicit val classTag: 
ClassTag[T])
    */
   def persist(newLevel: StorageLevel): JavaRDD[T] = 
wrapRDD(rdd.persist(newLevel))
 
+  /**
+   * 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.
+   */
+  def withResources(prof: ResourceProfile): JavaRDD[T] = 
wrapRDD(rdd.withResources(prof))
 
 Review comment:
   Please use `@Private` annotation if this is meant to be private yet:
   
https://github.com/apache/spark/blob/9610efc252c94f93689d45e320df1c5815d97b25/common/tags/src/main/java/org/apache/spark/annotation/Private.java#L26-L28

----------------------------------------------------------------
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]

Reply via email to