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/06/11 17:38:52 UTC

[GitHub] [spark] abhishekd0907 commented on a diff in pull request #35683: [SPARK-30835][SPARK-39018][CORE][YARN] Add support for YARN decommissioning when ESS is disabled

abhishekd0907 commented on code in PR #35683:
URL: https://github.com/apache/spark/pull/35683#discussion_r895049998


##########
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 " +
+        "on Decommissioning Nodes failed", e)

Review Comment:
   i have verified that none of the APIs there exceptions so have removed the catch



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