Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9478#discussion_r44488357
  
    --- Diff: 
core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala 
---
    @@ -233,19 +250,28 @@ final class ShuffleBlockFetcherIterator(
       private[this] def fetchLocalBlocks() {
         val iter = localBlocks.iterator
         while (iter.hasNext) {
    -      val blockId = iter.next()
    -      try {
    -        val buf = blockManager.getBlockData(blockId)
    -        shuffleMetrics.incLocalBlocksFetched(1)
    -        shuffleMetrics.incLocalBytesRead(buf.size)
    -        buf.retain()
    -        results.put(new SuccessFetchResult(blockId, 
blockManager.blockManagerId, 0, buf))
    -      } catch {
    -        case e: Exception =>
    -          // If we see an exception, stop immediately.
    -          logError(s"Error occurred while fetching local blocks", e)
    -          results.put(new FailureFetchResult(blockId, 
blockManager.blockManagerId, e))
    -          return
    +      val (blockManagerId, blockIds) = iter.next()
    +      val blockIter = blockIds.iterator
    +      while (blockIter.hasNext) {
    +        val blockId = blockIter.next()
    +        assert(blockId.isShuffle)
    +        try {
    +          val buf = if (!enableExternalShuffleService) {
    +            
blockManager.getShuffleBlockData(blockId.asInstanceOf[ShuffleBlockId], 
blockManagerId)
    +          } else {
    +            blockManager.getBlockData(blockId.asInstanceOf[ShuffleBlockId])
    +          }
    +          shuffleMetrics.incLocalBlocksFetched(1)
    +          shuffleMetrics.incLocalBytesRead(buf.size)
    +          buf.retain()
    +          results.put(new SuccessFetchResult(blockId, 
blockManager.blockManagerId, 0, buf))
    +        } catch {
    +          case e: Exception =>
    --- End diff --
    
    should use
    ```
    case NonFatal(e) =>
    ```


---
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]

Reply via email to