vanzin commented on a change in pull request #25299: [SPARK-27651][Core] Avoid the network when shuffle blocks are fetched from the same host URL: https://github.com/apache/spark/pull/25299#discussion_r346948299
########## File path: common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleBlockResolver.java ########## @@ -369,6 +371,12 @@ public int removeBlocks(String appId, String execId, String[] blockIds) { return numRemovedBlocks; } + public Map<String, String[]> getLocalDirs(String appId, String[] execIds) { + return Arrays.stream(execIds) + .map(exec -> Pair.of(exec, executors.get(new AppExecId(appId, exec)).localDirs)) Review comment: If for some reason the exec ID is not known, won't this throw an NPE? Shouldn't you try to return as much data as possible instead of that happening? ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org