You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "tgravescs (via GitHub)" <gi...@apache.org> on 2023/09/26 14:29:00 UTC

[GitHub] [spark] tgravescs commented on a diff in pull request #43030: [SPARK-45250][core] Support stage level task resource profile for yarn cluster when dynamic allocation disabled

tgravescs commented on code in PR #43030:
URL: https://github.com/apache/spark/pull/43030#discussion_r1337310074


##########
core/src/test/scala/org/apache/spark/resource/ResourceProfileManagerSuite.scala:
##########
@@ -126,18 +126,29 @@ class ResourceProfileManagerSuite extends SparkFunSuite {
     val defaultProf = rpmanager.defaultResourceProfile
     assert(rpmanager.isSupported(defaultProf))
 
-    // task resource profile.
+    // Standalone: supports task resource profile.
     val gpuTaskReq = new TaskResourceRequests().resource("gpu", 1)
     val taskProf = new TaskResourceProfile(gpuTaskReq.requests)
     assert(rpmanager.isSupported(taskProf))
 
+    // Local: doesn't support task resource profile.
     conf.setMaster("local")
     rpmanager = new ResourceProfileManager(conf, listenerBus)
     val error = intercept[SparkException] {
       rpmanager.isSupported(taskProf)
     }.getMessage
     assert(error === "TaskResourceProfiles are only supported for Standalone " +
       "cluster for now when dynamic allocation is disabled.")
+
+    // Local cluster: supports task resource profile.
+    conf.setMaster("local-cluster[1, 1, 1024]")
+    rpmanager = new ResourceProfileManager(conf, listenerBus)
+    rpmanager.isSupported(taskProf)
+
+    // Yarn: supports task resource profile.
+    conf.setMaster("yarn")
+    rpmanager = new ResourceProfileManager(conf, listenerBus)
+    rpmanager.isSupported(taskProf)
   }
 

Review Comment:
   it would be nice to add other tests here for yarn with TAskResourceProfile, like test:
     test("isSupported task resource profiles with dynamic allocation disabled") {
   which uses standalone.



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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org