cloud-fan commented on a change in pull request #19788: [SPARK-9853][Core] 
Optimize shuffle fetch of contiguous partition IDs
URL: https://github.com/apache/spark/pull/19788#discussion_r249471777
 
 

 ##########
 File path: 
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleBlockResolver.java
 ##########
 @@ -161,22 +161,69 @@ public void registerExecutor(
     executors.put(fullId, executorInfo);
   }
 
+  // For testing
+  public ManagedBuffer getBlockData(
+      String appId,
+      String execId,
+      int shuffleId,
+      int mapId,
+      int reduceId) {
+    return getBlockData(appId, execId, shuffleId, mapId, reduceId, 1);
+  }
+
   /**
-   * Obtains a FileSegmentManagedBuffer from (shuffleId, mapId, reduceId). We 
make assumptions
-   * about how the hash and sort based shuffles store their data.
+   * Obtains a FileSegmentManagedBuffer from (shuffleId, mapId, reduceId, 
numBlocks). We make
+   * assumptions about how the hash and sort based shuffles store their data.
    */
   public ManagedBuffer getBlockData(
       String appId,
       String execId,
       int shuffleId,
       int mapId,
-      int reduceId) {
+      int reduceId,
+      int numBlocks) {
 
 Review comment:
   nit: it seems like the name `numBlocks` doesn't fit well for this method. 
This method tries to get the block of a specific reducer from a specific 
mapper, so a better name would be
   ```
   public ManagedBuffer getBlockData(
     ...
     int startReducerId,
     int numReducers)
   ```
   Then we can say that this method is to get the block of several consecutive 
reducers from a specific mapper.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to