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

 ##########
 File path: 
core/src/main/scala/org/apache/spark/deploy/ExternalShuffleService.scala
 ##########
 @@ -58,9 +61,39 @@ class ExternalShuffleService(sparkConf: SparkConf, 
securityManager: SecurityMana
 
   private val shuffleServiceSource = new ExternalShuffleServiceSource
 
+  protected def findRegisteredExecutorsDBFile(dbName: String): File = {
+    val localDirs = 
sparkConf.getOption("spark.local.dir").map(_.split(",")).getOrElse(Array())
+    var dbFile: File = null
 
 Review comment:
   To be precise, a `map` after a `find` is needed:
   ```
       val localDirs = 
sparkConf.getOption("spark.local.dir").map(_.split(",")).getOrElse(Array())
       if (localDirs.length >= 1) {
         new File(localDirs.find(new File(_, 
dbName).exists()).getOrElse(localDirs(0)), dbName)
       } else {
         logWarning(s"'spark.local.dir' should be set first.")
         null
       }
   ```

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