pgandhi999 commented on a change in pull request #23437: [SPARK-26524] If the 
application directory fails to be created on the SPARK_WORKER_…
URL: https://github.com/apache/spark/pull/23437#discussion_r247331157
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/deploy/master/WorkerInfo.scala
 ##########
 @@ -101,5 +106,27 @@ private[spark] class WorkerInfo(
     this.state = state
   }
 
+  def setIsBlack(): Unit = {
+    this.isBlack = true
+    this.lastBlackTime = System.currentTimeMillis()
+  }
+
+  def unsetBlack(): Unit = {
+    this.isBlack = false
+    this.lastBlackTime = 0
+  }
+
+  def increaseFailedAppCount(appId: String) {
+    appIdToRetryCount(appId) = appIdToRetryCount.get(appId).map(_ + 
1).getOrElse(1)
+  }
+
+  def getFailedFailedCount(appId: String): Int = {
+    appIdToRetryCount.getOrElse(appId, 1)
 
 Review comment:
   Shouldn't this default to zero in the event no worker has failed?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]

Reply via email to