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

    https://github.com/apache/spark/pull/11105#discussion_r83271510
  
    --- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
    @@ -1314,27 +1347,54 @@ class SparkContext(config: SparkConf) extends 
Logging with ExecutorAllocationCli
       }
     
       /**
    -   * Register the given accumulator.  Note that accumulators must be 
registered before use, or it
    +   * Register the given accumulator. Note that accumulators must be 
registered before use, or it
        * will throw exception.
        */
       def register(acc: AccumulatorV2[_, _]): Unit = {
    -    acc.register(this)
    +    acc.register(this, dataProperty = false)
       }
     
       /**
    -   * Register the given accumulator with given name.  Note that 
accumulators must be registered
    +   * Register the given accumulator with given name. Note that 
accumulators must be registered
        * before use, or it will throw exception.
    +   *
    +   * @param name The name of accumulator.
        */
       def register(acc: AccumulatorV2[_, _], name: String): Unit = {
         acc.register(this, name = Some(name))
       }
     
       /**
    +   * Register the given accumulator. Note that accumulators must be 
registered before use, or it
    +   * will throw exception.
    +   *
    +   * @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.
    +   */
    +  def register(acc: AccumulatorV2[_, _], dataProperty: Boolean): Unit = {
    +    acc.register(this, dataProperty = dataProperty)
    +  }
    +
    +  /**
    +   * Register the given accumulator with given name. Note that 
accumulators must be registered
    +   * before use, or it will throw exception.
    +   *
    +   * @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.
    +   * @param name The name of accumulator.
    +   */
    +  def register(acc: AccumulatorV2[_, _], dataProperty: Boolean, name: 
String): Unit = {
    --- End diff --
    
    I think both of these `register` methods which expose `dataProperty` at all 
should be marked `@Experimental`.  probably elsewhere too, won't mention it 
other places.


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