You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/07/18 17:05:55 UTC

[GitHub] [spark] ifilonenko commented on a change in pull request #25007: [SPARK-28209][CORE][SHUFFLE] Proposed new shuffle writer API

ifilonenko commented on a change in pull request #25007: [SPARK-28209][CORE][SHUFFLE] Proposed new shuffle writer API 
URL: https://github.com/apache/spark/pull/25007#discussion_r305023369
 
 

 ##########
 File path: core/src/test/scala/org/apache/spark/ShuffleSuite.scala
 ##########
 @@ -383,13 +383,19 @@ abstract class ShuffleSuite extends SparkFunSuite with Matchers with LocalSparkC
     // simultaneously, and everything is still OK
 
     def writeAndClose(
-      writer: ShuffleWriter[Int, Int])(
+      writer: ShuffleWriter[Int, Int],
+      taskContext: TaskContext)(
       iter: Iterator[(Int, Int)]): Option[MapStatus] = {
-      val files = writer.write(iter)
-      writer.stop(true)
+      TaskContext.setTaskContext(taskContext)
 
 Review comment:
   Because there are TaskContext.get() calls in the implementation (createMapOutputWriter) — it is necessary that we set these on the tests to avoid NPE from not being set. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org