Github user sarutak commented on a diff in the pull request:
https://github.com/apache/spark/pull/2408#discussion_r17601336
--- Diff:
core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala
---
@@ -111,13 +112,21 @@ final class ShuffleBlockFetcherIterator(
blockTransferService.fetchBlocks(req.address.host, req.address.port,
blockIds,
new BlockFetchingListener {
override def onBlockFetchSuccess(blockId: String, data:
ManagedBuffer): Unit = {
- results.put(new FetchResult(BlockId(blockId), sizeMap(blockId),
- () => serializer.newInstance().deserializeStream(
- blockManager.wrapForCompression(BlockId(blockId),
data.inputStream())).asIterator
- ))
- shuffleMetrics.remoteBytesRead += data.size
- shuffleMetrics.remoteBlocksFetched += 1
- logDebug("Got remote block " + blockId + " after " +
Utils.getUsedTimeMs(startTime))
+ var is: InputStream = null
+ try {
+ is = data.inputStream()
+ results.put(new FetchResult(BlockId(blockId), sizeMap(blockId),
+ () => serializer.newInstance().deserializeStream(
+ blockManager.wrapForCompression(BlockId(blockId),
is)).asIterator
+ ))
+ shuffleMetrics.remoteBytesRead += data.size
--- End diff --
Ah, do you mean line 122 - 124 should be out of try block? I agree with
that.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]