Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/10835#discussion_r50745950
--- Diff: core/src/main/scala/org/apache/spark/Accumulable.scala ---
@@ -139,22 +148,28 @@ class Accumulable[R, T] private[spark] (
}
/**
- * Set the accumulator's value; only allowed on master
+ * Set the accumulator's value. For internal use only.
*/
- def setValue(newValue: R) {
- this.value = newValue
- }
+ def setValue(newValue: R): Unit = { value_ = newValue }
+
+ /**
+ * Set the accumulator's value. For internal use only.
+ */
+ private[spark] def setValueAny(newValue: Any): Unit = {
setValue(newValue.asInstanceOf[R]) }
// Called by Java when deserializing an object
private def readObject(in: ObjectInputStream): Unit =
Utils.tryOrIOException {
in.defaultReadObject()
- value_ = zero
- deserialized = true
+ // TODO: As of SPARK-12895 we send accumulators both ways between
executors and the driver.
--- End diff --
well I explain that it's "between the executors and the driver" right after
that so I think it's OK. Either way this comment is removed in my next patch.
---
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]