Github user squito commented on a diff in the pull request:
https://github.com/apache/spark/pull/11105#discussion_r83271825
--- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
@@ -1343,7 +1403,25 @@ class SparkContext(config: SparkConf) extends
Logging with ExecutorAllocationCli
*/
def longAccumulator(name: String): LongAccumulator = {
val acc = new LongAccumulator
- register(acc, name)
+ register(acc, dataProperty = false, name)
+ acc
+ }
+
+ /**
+ * Create and register a long accumulator, which starts with 0 and
accumulates inputs by `+=`.
+ */
+ def dataPropertyLongAccumulator: LongAccumulator = {
--- End diff --
super subjective, but I don't like having a special method for this. I
think you should have another version of `longAccumulator` which takes a
`dataProperty` argument (also marked `@Experimental`).
---
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]