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 2019/01/13 01:28:32 UTC
[GitHub] pgandhi999 commented on a change in pull request #23437: [SPARK-26524] If the application directory fails to be created on the SPARK_WORKER_…
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org