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

    https://github.com/apache/spark/pull/16989#discussion_r117173550
  
    --- Diff: core/src/test/scala/org/apache/spark/MapOutputTrackerSuite.scala 
---
    @@ -29,7 +29,11 @@ import org.apache.spark.shuffle.FetchFailedException
     import org.apache.spark.storage.{BlockManagerId, ShuffleBlockId}
     
     class MapOutputTrackerSuite extends SparkFunSuite {
    +
       private val conf = new SparkConf
    +  val env = mock(classOf[SparkEnv])
    --- End diff --
    
    It's a little weird that we have to modify this. I kind of understand why 
we don't want to thread SparkEnv or another setting into the `MapStatus` 
constructor but maybe we could avoid the confusing NPEs that this prevents by 
doing something like
    
    ```
    
Option(SparkEnv.get).map(_.conf.get(config.SHUFFLE_ACCURATE_BLOCK_THRESHOLD)).getOrElse(config.SHUFFLE_ACCURATE_BLOCK_THRESHOLD.default)
    ```
    
    thereby minimizing changes to other files / tests.


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