dongjoon-hyun commented on a change in pull request #25047:
[WIP][SPARK-27371][CORE] Support GPU-aware resources scheduling in Standalone
URL: https://github.com/apache/spark/pull/25047#discussion_r300217158
##########
File path: core/src/main/scala/org/apache/spark/deploy/master/WorkerInfo.scala
##########
@@ -89,17 +122,52 @@ private[spark] class WorkerInfo(
drivers(driver.id) = driver
memoryUsed += driver.desc.mem
coresUsed += driver.desc.cores
+ driverToResourcesUsed(driver.id) = driver.resources
}
def removeDriver(driver: DriverInfo) {
drivers -= driver.id
memoryUsed -= driver.desc.mem
coresUsed -= driver.desc.cores
+ driverToResourcesUsed.remove(driver.id)
}
def setState(state: WorkerState.Value): Unit = {
this.state = state
}
def isAlive(): Boolean = this.state == WorkerState.ALIVE
+
+ /**
+ * acquire specified amount resources for driver/executor from the worker
+ * @param resourceReqs the resources requirement from driver/executor
+ * @return
+ */
+ def acquireResources(resourceReqs: Map[String, Int])
+ : Map[String, Seq[String]] = {
Review comment:
nit. indentation.
----------------------------------------------------------------
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]