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

    https://github.com/apache/spark/pull/7839#discussion_r36107092
  
    --- Diff: 
network/shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleBlockResolver.java
 ---
    @@ -252,4 +264,20 @@ public String toString() {
             .toString();
         }
       }
    +
    +  private void saveRegisteredExecutors() throws IOException {
    +    if (registeredExecutorFile != null) {
    +      logger.info("Saving registered executors to {}", 
registeredExecutorFile);
    +      ObjectOutputStream out = new ObjectOutputStream(new 
FileOutputStream(registeredExecutorFile));
    --- End diff --
    
    For paranoia, mostly, wouldn't it be better to write this to a temp file 
and the rename it? That avoids the hopefully rare case of the NM going down 
while the file is being written.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to