File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
core/src/main/scala/org/apache/spark/storage Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -356,6 +356,7 @@ final class ShuffleBlockFetcherIterator(
356356 // Only copy the stream if it's wrapped by compression or encryption, also the size of
357357 // block is small (the decompressed block is smaller than maxBytesInFlight)
358358 if (detectCorrupt && ! input.eq(in) && size < maxBytesInFlight / 3 ) {
359+ val originalInput = input
359360 val out = new ChunkedByteBufferOutputStream (64 * 1024 , ByteBuffer .allocate)
360361 try {
361362 // Decompress the whole block at once to detect any corruption, which could increase
@@ -378,7 +379,7 @@ final class ShuffleBlockFetcherIterator(
378379 }
379380 } finally {
380381 // TODO: release the buf here to free memory earlier
381- input .close()
382+ originalInput .close()
382383 in.close()
383384 }
384385 }
You can’t perform that action at this time.
0 commit comments