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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]