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

    https://github.com/apache/spark/pull/11105#discussion_r83270945
  
    --- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
    @@ -1251,7 +1251,22 @@ class SparkContext(config: SparkConf) extends 
Logging with ExecutorAllocationCli
        */
       @deprecated("use AccumulatorV2", "2.0.0")
       def accumulator[T](initialValue: T)(implicit param: 
AccumulatorParam[T]): Accumulator[T] = {
    -    val acc = new Accumulator(initialValue, param)
    +    accumulator(initialValue, dataProperty = false)
    +  }
    +
    +  /**
    +   * Create an [[org.apache.spark.Accumulator]] variable of a given type, 
which tasks can "add"
    +   * values to using the `+=` method. Only the driver can access the 
accumulator's `value`.
    +   *
    +   * @param dataProperty If the accumulator should avoid re-counting 
multiple evaluations on the
    +   *                     same RDD/partition. This adds some additional 
overhead for tracking and
    +   *                     is an experimental feature.
    +   */
    +  @deprecated("use AccumulatorV2", "2.1.0")
    --- End diff --
    
    what's the argument for adding it to the old api?  Though I see the 
temptation, since its a nice new feature and we want to support users who 
haven't migrated yet -- I really don't think it makes sense to be adding stuff 
to a deprecated api.  It will make users think its not really deprecated.  Plus 
you provide a nice carrot for moving to the new api ;)


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to