httfighter 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_r247377325
##########
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:
@pgandhi999 Thank you for your review! Only when the number of times reaches
the configured value “spark.deploy.executorFailedPerWorkerThreshold” ,
worker.isBlack will be set to true, otherwise it will not be affected.
When the application is finished, the information saved by appId in
appIdToRetryCount will also be removed. So I didn't zero the number.
----------------------------------------------------------------
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]