Github user aarondav commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1274#discussion_r14418731
  
    --- Diff: 
core/src/main/scala/org/apache/spark/storage/DiskBlockManager.scala ---
    @@ -115,8 +121,9 @@ private[spark] class DiskBlockManager(shuffleManager: 
ShuffleBlockManager, rootD
     
       private def createLocalDirs(): Array[File] = {
         logDebug(s"Creating local directories at root dirs '$rootDirs'")
    +    val localDirsResult = ArrayBuffer[File]()
         val dateFormat = new SimpleDateFormat("yyyyMMddHHmmss")
    -    rootDirs.split(",").map { rootDir =>
    +    rootDirs.split(",").foreach { rootDir =>
    --- End diff --
    
    Scala style thing, you can use flatMap instead of foreach here and return 
None in the case where directory creation failed and Some(localDir) in the case 
where it worked.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to