Github user mwws commented on a diff in the pull request:
https://github.com/apache/spark/pull/11249#discussion_r53742303
--- Diff:
streaming/src/main/scala/org/apache/spark/streaming/Checkpoint.scala ---
@@ -41,6 +41,13 @@ class Checkpoint(ssc: StreamingContext, val
checkpointTime: Time)
val checkpointDuration = ssc.checkpointDuration
val pendingTimes = ssc.scheduler.getPendingTimes().toArray
val sparkConfPairs = ssc.conf.getAll
+ @transient val recoverableAccuNameToId = ssc.recoverableAccuNameToId
+
+ // initialize from ssc.context after SPARK-13051
+ val trackedAccs: Array[AccumulableCheckpoint[_, _]] =
Accumulators.originals.filter(ele =>
--- End diff --
The extra logic in Accumulable.readObject is coupled with a branch of other
codes, I am not sure I want to touch them here.
And actually It's a common pattern to extract necessary parts from object
and recover from the subset. For example: class `Checkpoint` do the same thing
to "StreamingContext".
Moreover, accumulator id is not assignable but it increases automatically
when create a new one, which means the recovered Accumulator is not 100% same
as original one, at least they have different accumulator id. So I would prefer
"AccumulatorCheckpoint" which already contains enough information for
recovering.
---
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]