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

    https://github.com/apache/spark/pull/14887#discussion_r76911079
  
    --- Diff: 
common/network-yarn/src/main/java/org/apache/spark/network/yarn/YarnShuffleService.java
 ---
    @@ -270,9 +272,17 @@ protected Path getRecoveryPath() {
         }
     
         if (_recoveryPath == null) {
    -      _recoveryPath = new Path(localDirs[0]);
    +      for (String dir : localDirs) {
    +        try {
    +          DiskChecker.checkDir(new File(dir));
    +          _recoveryPath = new Path(dir);
    +          return _recoveryPath;
    +        } catch (DiskErrorException e) {
    +          logger.warn("Local disk {} not available", dir, e);
    +        }
    +      }
         }
     
    -    return _recoveryPath;
    +    return null;
    --- End diff --
    
    I would throw an exception to let it fail if the code reaches to here, 
which means all the disks are unavailable.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to