You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/05/13 00:47:33 UTC
[GitHub] [spark] attilapiros commented on a diff in pull request #35683: [SPARK-30835][SPARK-39018][CORE][YARN] Add support for YARN decommissioning when ESS is disabled
attilapiros commented on code in PR #35683:
URL: https://github.com/apache/spark/pull/35683#discussion_r871915524
##########
resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/YarnAllocatorSuite.scala:
##########
@@ -735,4 +744,77 @@ class YarnAllocatorSuite extends SparkFunSuite with Matchers with BeforeAndAfter
sparkConf.set(EXECUTOR_MEMORY_OVERHEAD_FACTOR, 0.1)
}
}
+
+ test("Test YARN container decommissioning") {
+
Review Comment:
Nit: remove empty line
##########
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocator.scala:
##########
@@ -422,6 +446,27 @@ private[yarn] class YarnAllocator(
}
}
+ private def handleNodesInDecommissioningState(allocateResponse: AllocateResponse): Unit = {
+ try {
+ // Some of the nodes are put in decommissioning state where RM did allocate
+ // resources on those nodes for earlier allocateResource calls, so notifying driver
+ // to put those executors in decommissioning state
+ allocateResponse.getUpdatedNodes.asScala.filter (node =>
+ node.getNodeState == NodeState.DECOMMISSIONING &&
+ !decommissioningNodesCache.containsKey(getHostAddress(node)))
+ .foreach { node =>
+ val host = getHostAddress(node)
+ driverRef.send(DecommissionExecutorsOnHost(host))
+ decommissioningNodesCache.put(host, true)
+ }
+ } catch {
+ case e: Exception => logError("Sending Message to Driver to Decommission Executors" +
Review Comment:
Without the extra space it will be "... Executorson Decommissioning Nodes failed":
```suggestion
case e: Exception => logError("Sending Message to Driver to Decommission Executors " +
```
--
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