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

    https://github.com/apache/spark/pull/1241#discussion_r16760326
  
    --- Diff: 
core/src/main/scala/org/apache/spark/shuffle/FileShuffleBlockManager.scala ---
    @@ -181,17 +171,30 @@ class ShuffleBlockManager(blockManager: BlockManager,
     
       /**
        * Returns the physical file segment in which the given BlockId is 
located.
    -   * This function should only be called if shuffle file consolidation is 
enabled, as it is
    -   * an error condition if we don't find the expected block.
        */
       def getBlockLocation(id: ShuffleBlockId): FileSegment = {
    -    // Search all file groups associated with this shuffle.
    -    val shuffleState = shuffleStates(id.shuffleId)
    -    for (fileGroup <- shuffleState.allFileGroups) {
    -      val segment = fileGroup.getFileSegmentFor(id.mapId, id.reduceId)
    -      if (segment.isDefined) { return segment.get }
    +    if (consolidateShuffleFiles) {
    +      // Search all file groups associated with this shuffle.
    +      val shuffleState = shuffleStates(id.shuffleId)
    +      val iter = shuffleState.allFileGroups.iterator
    +      while (iter.hasNext) {
    +        val segment = iter.next.getFileSegmentFor(id.mapId, id.reduceId)
    +        if (segment.isDefined) { return segment.get }
    +      }
    +      throw new IllegalStateException("Failed to find shuffle block: " + 
id)
    +    } else {
    +      val file = blockManager.diskBlockManager.getFile(id)
    --- End diff --
    
    this no longer supports file consolidation, does it?


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