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

    https://github.com/apache/spark/pull/10368#discussion_r48078649
  
    --- Diff: 
core/src/test/scala/org/apache/spark/scheduler/TaskResultGetterSuite.scala ---
    @@ -81,6 +81,16 @@ class TaskResultGetterSuite extends SparkFunSuite with 
BeforeAndAfter with Local
       // as we can make it) so the tests don't take too long.
       def conf: SparkConf = new SparkConf().set("spark.akka.frameSize", "1")
     
    +  test("Kryo serializer for TaskResult") {
    +    val conf1 = new SparkConf(false)
    +    conf1.set("spark.serializer", 
"org.apache.spark.serializer.KryoSerializer")
    +    conf1.set("spark.kryoserializer.buffer", "1m")
    +    conf1.set("spark.kryoserializer.buffer.max", "2m")
    +    sc = new SparkContext("local", "test", conf1)
    +    val result = sc.parallelize(Seq(1), 1).map(x => 2 * x).reduce((x, y) 
=> x)
    +    assert(result === 2)
    --- End diff --
    
    Please take a look at createTaskResult() in 
core/src/test/scala/org/apache/spark/scheduler/TaskSetManagerSuite.scala :
    ```
      def createTaskResult(id: Int): DirectTaskResult[Int] = {
        val valueSer = SparkEnv.get.serializer.newInstance()
        new DirectTaskResult[Int](valueSer.serialize(id), mutable.Map.empty, 
new TaskMetrics)
      }
    ```


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