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

    https://github.com/apache/spark/pull/7268#discussion_r34714474
  
    --- Diff: 
core/src/test/scala/org/apache/spark/shuffle/hash/HashShuffleReaderSuite.scala 
---
    @@ -117,9 +117,13 @@ class HashShuffleReaderSuite extends SparkFunSuite 
with LocalSparkContext {
         val mapOutputTracker = mock(classOf[MapOutputTracker])
         // Test a scenario where all data is local, just to avoid creating a 
bunch of additional mocks
         // for the code to read data over the network.
    -    val statuses: Array[(BlockManagerId, Long)] =
    -      Array.fill(numMaps)((localBlockManagerId, 
byteOutputStream.size().toLong))
    -    when(mapOutputTracker.getServerStatuses(shuffleId, 
reduceId)).thenReturn(statuses)
    +    var mapId = 0
    --- End diff --
    
    Can you to `(0 to numMaps).map{}` to eliminate the need for this mutable 
variable?


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