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/03/06 18:41:02 UTC

[GitHub] [spark] attilapiros commented on a change in pull request #23393: [SPARK-26288][CORE]add initRegisteredExecutorsDB

attilapiros commented on a change in pull request #23393: [SPARK-26288][CORE]add initRegisteredExecutorsDB
URL: https://github.com/apache/spark/pull/23393#discussion_r263025176
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/deploy/ExternalShuffleService.scala
 ##########
 @@ -58,9 +62,42 @@ class ExternalShuffleService(sparkConf: SparkConf, securityManager: SecurityMana
 
   private val shuffleServiceSource = new ExternalShuffleServiceSource
 
+  protected def findRegisteredExecutorsDBFile(dbName: String): File = {
+    val localDirs = sparkConf.get("spark.local.dir", "").split(",")
+    var dbFile: File = null
+    if (localDirs.length > 1 || (localDirs.length == 1 && localDirs(0).nonEmpty)) {
+      for (dir <- localDirs) {
+        val tmpFile = new File(dir, dbName)
+        if (tmpFile.exists()) {
+          dbFile = tmpFile
+        }
+      }
+      if (dbFile != null) {
+        dbFile
+      }
+      else {
 
 Review comment:
   Nit: indentation 
   
   ```
   if () {
   ...
   } else {
   ...
   }
   ```

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