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

    https://github.com/apache/spark/pull/7839#discussion_r36106227
  
    --- Diff: 
network/yarn/src/main/java/org/apache/spark/network/yarn/YarnShuffleService.java
 ---
    @@ -181,4 +246,28 @@ public ByteBuffer getMetaData() {
         return ByteBuffer.allocate(0);
       }
     
    +  private void reloadRegisteredExecutors() throws IOException, 
ClassNotFoundException {
    +    if (registeredExecutorFile != null && registeredExecutorFile.exists()) 
{
    +      ObjectInputStream in = new ObjectInputStream(new 
FileInputStream(registeredExecutorFile));
    +      int nExecutors = in.readInt();
    +      logger.info("Reloading executors from {}", registeredExecutorFile);
    +      for (int i = 0; i < nExecutors; i++) {
    +        AppExecId appExecId = (AppExecId) in.readObject();
    +        ExecutorShuffleInfo shuffleInfo = (ExecutorShuffleInfo) 
in.readObject();
    +        logger.info("Recovered executor {} with {}", appExecId, 
shuffleInfo);
    +        List<Map.Entry<AppExecId, ExecutorShuffleInfo>> executorsForApp =
    +          recoveredExecutorRegistrations.get(appExecId.appId);
    +        if (executorsForApp == null) {
    +          executorsForApp = new ArrayList<>();
    +          recoveredExecutorRegistrations.put(appExecId.appId, 
executorsForApp);
    +        }
    +        executorsForApp.add(new 
AbstractMap.SimpleImmutableEntry<>(appExecId, shuffleInfo));
    +      }
    +      in.close();
    +    } else {
    +      logger.info("No executor info to reload");
    +    }
    +  }
    +
    --- End diff --
    
    nit: too many empty lines.


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