Ngone51 commented on a change in pull request #25047: [SPARK-27371][CORE]
Support GPU-aware resources scheduling in Standalone
URL: https://github.com/apache/spark/pull/25047#discussion_r312126840
##########
File path: core/src/main/scala/org/apache/spark/deploy/master/Master.scala
##########
@@ -683,8 +702,7 @@ private[deploy] class Master(
if (app.coresLeft >= coresPerExecutor) {
// Filter out workers that don't have enough resources to launch an
executor
val usableWorkers = workers.toArray.filter(_.state ==
WorkerState.ALIVE)
- .filter(worker => worker.memoryFree >= app.desc.memoryPerExecutorMB
&&
- worker.coresFree >= coresPerExecutor)
+ .filter(canLaunchExecutor(_, app.desc))
.sortBy(_.coresFree).reverse
Review comment:
How about this way?
```
for (app <- waitingApps) {
...
val usableWorkers = workers.toArray.filter(_.state == WorkerState.ALIVE)
.filter(canLaunchExecutor(_, app.desc))
.sortBy(_.coresFree).reverse
if (waitingApps.size == 1 && usableWorkers.isEmpty) {
logWarn("The app requires more resources(mem, core, accelerator) than
any of Workers could have.")
}
...
}
```
Telling the Workers are not configured with the resources(I mean
accelerator) as an app requested may require more changes. For example, you may
need to traversal workers again to judge whether it's due to resources(I mean
accelerator) or memory or cores. Or, you need to refactor `canLaunchExecutor`
to tell more details.
----------------------------------------------------------------
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]