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

    https://github.com/apache/spark/pull/15861#discussion_r87689473
  
    --- Diff: 
core/src/test/scala/org/apache/spark/scheduler/OutputCommitCoordinatorSuite.scala
 ---
    @@ -229,14 +234,21 @@ private case class OutputCommitFunctions(tempDirPath: 
String) {
         def jobConf = new JobConf {
           override def getOutputCommitter(): OutputCommitter = outputCommitter
         }
    -    val sparkHadoopWriter = new SparkHadoopWriter(jobConf) {
    -      override def newTaskAttemptContext(
    -        conf: JobConf,
    -        attemptId: TaskAttemptID): TaskAttemptContext = {
    -        mock(classOf[TaskAttemptContext])
    -      }
    -    }
    -    sparkHadoopWriter.setup(ctx.stageId, ctx.partitionId, 
ctx.attemptNumber)
    -    sparkHadoopWriter.commit()
    +
    +    // Instantiate committer.
    +    val committer = FileCommitProtocol.instantiate(
    --- End diff --
    
    We are not supposed to create a `SparkHadoopWriter` inside this method, we 
can just create a `HadoopMapRedCommitProtocol` instead.


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