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

    https://github.com/apache/spark/pull/10368#discussion_r48507496
  
    --- Diff: 
core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala ---
    @@ -109,6 +111,9 @@ class KryoSerializer(conf: SparkConf)
         kryo.register(classOf[SerializableJobConf], new KryoJavaSerializer())
         kryo.register(classOf[HttpBroadcast[_]], new KryoJavaSerializer())
         kryo.register(classOf[PythonBroadcast], new KryoJavaSerializer())
    +    kryo.register(classOf[TaskMetrics], new KryoJavaSerializer())
    +    kryo.register(classOf[DirectTaskResult[_]], new KryoJavaSerializer())
    +    kryo.register(classOf[IndirectTaskResult[_]], new KryoJavaSerializer())
    --- End diff --
    
    I just found there are more classes need to register, such as 
`ShuffleReadMetrics`, `OutputMetrics` and `ShuffleWriteMetrics`. The problem is 
that most fields in `TaskMetrics` are `Option` so the new added unit tests 
cannot cover them.
    
    Not sure how many people uses `spark.kryo.registrationRequired`. But if 
they enable it, we will break their codes.
    
    In addition, even if we register all necessary classes now, people may 
forget to register new classes if they just add an `Option` field in future.
    
    I prefer to close this PR since I don't think this patch buys us much due 
to the tricky thing introduced.


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