Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,22 @@ private[spark] class BlockStoreShuffleReader[K, C](

// Wrap the streams for compression based on configuration
val wrappedStreams = blockFetcherItr.map { case (blockId, inputStream) =>
serializerManager.wrapForCompression(blockId, inputStream)
try {
serializerManager.wrapForCompression(blockId, inputStream)
} catch {
case e: IOException => {
if ((e.getMessage.contains("FAILED_TO_UNCOMPRESS(5)") ||
e.getMessage.contains("PARSING_ERROR(2)") ||
e.getMessage.contains("Stream is corrupted")) && blockId.isShuffle) {
val shuffleBlockId = blockId.asInstanceOf[ShuffleBlockId]
throw new FetchFailedException(
blockManager.blockManagerId, shuffleBlockId.shuffleId,
shuffleBlockId.mapId, shuffleBlockId.reduceId, e)
} else {
throw e
}
}
}
}

val serializerInstance = dep.serializer.newInstance()
Expand Down