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

    https://github.com/apache/spark/pull/4066#discussion_r24048694
  
    --- Diff: 
core/src/test/scala/org/apache/spark/scheduler/DAGSchedulerSuite.scala ---
    @@ -766,5 +753,10 @@ class DAGSchedulerSuite extends FunSuiteLike  with 
BeforeAndAfter with LocalSpar
         assert(scheduler.shuffleToMapStage.isEmpty)
         assert(scheduler.waitingStages.isEmpty)
       }
    +
    +  // Nothing in this test should break if the task info's fields are null, 
but
    +  // OutputCommitCoordinator requires the task info itself to not be null.
    +  private def createFakeTaskInfo(): TaskInfo = mock(classOf[TaskInfo])
    --- End diff --
    
    It looks like this mocking causes spurious exceptions in 
JobProgressListener, which pollutes the unit test log:
    
    ```
    15/02/03 14:50:24.617 SparkListenerBus ERROR LiveListenerBus: Listener 
JobProgressListener threw an exception
    java.lang.NullPointerException
        at 
org.apache.spark.ui.jobs.JobProgressListener.onTaskEnd(JobProgressListener.scala:323)
        at 
org.apache.spark.scheduler.SparkListenerBus$class.onPostEvent(SparkListenerBus.scala:42)
        at 
org.apache.spark.scheduler.LiveListenerBus.onPostEvent(LiveListenerBus.scala:31)
        at 
org.apache.spark.scheduler.LiveListenerBus.onPostEvent(LiveListenerBus.scala:31)
        at 
org.apache.spark.util.ListenerBus$class.postToAll(ListenerBus.scala:52)
        at 
org.apache.spark.util.AsynchronousListenerBus.postToAll(AsynchronousListenerBus.scala:36)
        at 
org.apache.spark.util.AsynchronousListenerBus$$anon$1$$anonfun$run$1.apply$mcV$sp(AsynchronousListenerBus.scala:76)
        at 
org.apache.spark.util.AsynchronousListenerBus$$anon$1$$anonfun$run$1.apply(AsynchronousListenerBus.scala:61)
        at 
org.apache.spark.util.AsynchronousListenerBus$$anon$1$$anonfun$run$1.apply(AsynchronousListenerBus.scala:61)
        at org.apache.spark.util.Utils$.logUncaughtExceptions(Utils.scala:1559)
        at 
org.apache.spark.util.AsynchronousListenerBus$$anon$1.run(AsynchronousListenerBus.scala:60)
    ```
    
    JobProgressListener has an `if` that guards against the taskInfo field 
being null, but this mock bypasses that and causes an exception to occur when 
it tries to access fields of the mock object.
    
    It looks like we no longer use TaskInfo in OutputCommitCoordinator, so I 
think it should be safe for me to roll back the changes in this file.


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