Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Actual fix
  • Loading branch information
bozhang2820 committed Jun 18, 2024
commit a5e062367a667585c98c438afeb198bd8e750bfe
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ class ShuffleBlockFetcherIteratorSuite extends SparkFunSuite with PrivateMethodT
.when(blockManager)
.getHostLocalShuffleData(meq(blockId.asInstanceOf[ShuffleBlockId]), any())
}
val hostLocalBmId = BlockManagerId("test-host-local-client-1", "test-local-host", 3)

val mockExternalBlockStoreClient = mock(classOf[ExternalBlockStoreClient])
val hostLocalDirManager = new HostLocalDirManager(
Expand All @@ -391,7 +392,8 @@ class ShuffleBlockFetcherIteratorSuite extends SparkFunSuite with PrivateMethodT

configureMockTransfer(Map())
val iterator = createShuffleBlockIteratorWithDefaults(
Map(blockManager.blockManagerId -> toBlockList(hostLocalBlocks.keys, 1L, 1))
Map(hostLocalBmId -> toBlockList(hostLocalBlocks.keys, 1L, 1)),
blockManager = Some(blockManager)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blockManager is actually the default value of createShuffleBlockIteratorWithDefaults(). So it looks like there is no actual difference made by this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do change the return of blockManager.hostLocalDirManager to Some(hostLocalDirManager), so that the blocks are treated as host-local.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. That makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified locally that the correct code path was reached in partitionBlocksByFetchMode. I can add an additional check to verify that mockExternalBlockStoreClient.getHostLocalDirs was called in the test.

)
intercept[FetchFailedException] { iterator.next() }
}
Expand Down