jlpedrosa commented on a change in pull request #24702: [SPARK-27989] 
[Kubernetes] [Core] Added retries on the connection to the driver for k8s
URL: https://github.com/apache/spark/pull/24702#discussion_r294319256
 
 

 ##########
 File path: 
core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala
 ##########
 @@ -283,7 +283,19 @@ private[spark] object CoarseGrainedExecutorBackend 
extends Logging {
         executorConf,
         new SecurityManager(executorConf),
         clientMode = true)
-      val driver = fetcher.setupEndpointRefByURI(arguments.driverUrl)
+
+      var driver: RpcEndpointRef = null
+      val nTries = 3
+      for (i <- 0 until nTries if driver == null) {
+        try {
+          driver = fetcher.setupEndpointRefByURI(arguments.driverUrl)
+        } catch {
+          case e: Throwable => if (i == nTries -1) {
 
 Review comment:
   Hi @srowen Ah, Ok. Didn't saw that space, if there's a way to run the style 
checker would be excelent! I followed the [official 
docs](http://spark.apache.org/contributing.html#code-style-guide) but that 
tried to refactor hundreds of files. I've pushed the change you requested.

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