attilapiros commented on a change in pull request #24499: [SPARK-25888][Core]
Serve local disk persisted blocks by the external service after releasing
executor by dynamic allocation
URL: https://github.com/apache/spark/pull/24499#discussion_r282145524
##########
File path:
common/network-common/src/test/java/org/apache/spark/network/server/OneForOneStreamManagerSuite.java
##########
@@ -30,22 +31,47 @@
public class OneForOneStreamManagerSuite {
@Test
- public void managedBuffersAreFeedWhenConnectionIsClosed() throws Exception {
+ public void testMissingChunk() {
OneForOneStreamManager manager = new OneForOneStreamManager();
List<ManagedBuffer> buffers = new ArrayList<>();
TestManagedBuffer buffer1 = Mockito.spy(new TestManagedBuffer(10));
TestManagedBuffer buffer2 = Mockito.spy(new TestManagedBuffer(20));
+ TestManagedBuffer buffer3 = Mockito.spy(new TestManagedBuffer(20));
+
buffers.add(buffer1);
+ buffers.add(null);
buffers.add(buffer2);
+ buffers.add(null);
Review comment:
It is `null`s because of the initial value of `res` which only reassigned
when the file exists:
https://github.com/apache/spark/blob/cc7aea020a45adda9a464b3bb9300a6b35ec77ca/common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleBlockResolver.java#L312-L321
But I think here is an interesting case: what if the file existed when
`FileSegmentManagedBuffer ` is constructed with a non-zero length but when the
file is about to be put on the wire or right before that it is removed by the
owning executor. In my next commit this case will cover by a unit test too.
----------------------------------------------------------------
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]