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

    https://github.com/apache/spark/pull/17596#discussion_r111722114
  
    --- Diff: core/src/main/scala/org/apache/spark/util/AccumulatorV2.scala ---
    @@ -154,18 +154,22 @@ abstract class AccumulatorV2[IN, OUT] extends 
Serializable {
     
       // Called by Java when serializing an object
       final protected def writeReplace(): Any = {
    -    if (atDriverSide) {
    +    val acc = if (atDriverSide) {
           if (!isRegistered) {
             throw new UnsupportedOperationException(
               "Accumulator must be registered before send to executor")
           }
           val copyAcc = copyAndReset()
           assert(copyAcc.isZero, "copyAndReset must return a zero value copy")
    -      copyAcc.metadata = metadata
           copyAcc
         } else {
    -      this
    +      val copyAcc = copy()
    --- End diff --
    
    Do you know it is okay to remove that validation? Just assuming the 
comments,  it sounds not needed. I just ran `AccumulatorV2Suite` and ` python 
run-tests.py --module=pyspark-core` and the failures are gone away.


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