cloud-fan commented on a change in pull request #26040: [SPARK-9853][Core]
Optimize shuffle fetch of continuous partition IDs
URL: https://github.com/apache/spark/pull/26040#discussion_r332486945
##########
File path:
common/network-shuffle/src/test/java/org/apache/spark/network/shuffle/ExternalBlockHandlerSuite.java
##########
@@ -101,14 +101,30 @@ public void testFetchShuffleBlocks() {
when(blockResolver.getBlockData("app0", "exec1", 0, 0,
1)).thenReturn(blockMarkers[1]);
FetchShuffleBlocks fetchShuffleBlocks = new FetchShuffleBlocks(
- "app0", "exec1", 0, new long[] { 0 }, new int[][] {{ 0, 1 }});
+ "app0", "exec1", 0, new long[] { 0 }, new int[][] {{ 0, 1 }}, false);
checkOpenBlocksReceive(fetchShuffleBlocks, blockMarkers);
verify(blockResolver, times(1)).getBlockData("app0", "exec1", 0, 0, 0);
verify(blockResolver, times(1)).getBlockData("app0", "exec1", 0, 0, 1);
verifyOpenBlockLatencyMetrics();
}
+ @Test
+ public void testFetchShuffleBlocksInBatch() {
+ ManagedBuffer[] batchBlockMarkers = {
+ new NioManagedBuffer(ByteBuffer.wrap(new byte[10]))
+ };
+ when(blockResolver.getContinuousBlocksData(
+ "app0", "exec1", 0, 0, 0, 1)).thenReturn(batchBlockMarkers[0]);
Review comment:
can we test fetching more than one block?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]