GitHub user keypointt opened a pull request:

    https://github.com/apache/spark/pull/14226

    [SPARK-16580][CORE] class Accumulator in package spark is deprecated: use 
AccumulatorV2

    https://issues.apache.org/jira/browse/SPARK-16580#
    
    ## What changes were proposed in this pull request?
    
    When I was working on the R wrapper, I found the compile warn.
    ```
    > project mllib
    > console
    [warn] 
/Users/renxin/workspace/spark/core/src/main/scala/org/apache/spark/api/python/PythonRDD.scala:78:
 class Accumulator in package spark is deprecated: use AccumulatorV2
    [warn]     accumulator: Accumulator[JList[Array[Byte]]])
    [warn]
    [warn] 
/Users/renxin/workspace/spark/core/src/main/scala/org/apache/spark/api/python/PythonRDD.scala:78:
 class Accumulator in package spark is deprecated: use AccumulatorV2
    [warn]     accumulator: Accumulator[JList[Array[Byte]]])
    [warn]
    [warn] 
/Users/renxin/workspace/spark/core/src/main/scala/org/apache/spark/api/python/PythonRDD.scala:78:
 class Accumulator in package spark is deprecated: use AccumulatorV2
    [warn]     accumulator: Accumulator[JList[Array[Byte]]])
    [warn]
    [warn] 
/Users/renxin/workspace/spark/core/src/main/scala/org/apache/spark/api/python/PythonRDD.scala:71:
 class Accumulator in package spark is deprecated: use AccumulatorV2
    [warn] private[spark] case class PythonFunction(
    [warn]
    [warn] 
/Users/renxin/workspace/spark/core/src/main/scala/org/apache/spark/api/python/PythonRDD.scala:78:
 class Accumulator in package spark is deprecated: use AccumulatorV2
    [warn]     accumulator: Accumulator[JList[Array[Byte]]])
    [warn]
    [warn] 
/Users/renxin/workspace/spark/core/src/main/scala/org/apache/spark/api/python/PythonRDD.scala:873:
 trait AccumulatorParam in package spark is deprecated: use AccumulatorV2
    [warn]   extends AccumulatorParam[JList[Array[Byte]]] {
    [warn]
    [warn] 
/Users/renxin/workspace/spark/core/src/main/scala/org/apache/spark/util/AccumulatorV2.scala:459:
 trait AccumulableParam in package spark is deprecated: use AccumulatorV2
    [warn]     param: org.apache.spark.AccumulableParam[R, T]) extends 
AccumulatorV2[T, R] {
    [warn]
    [warn] 
/Users/renxin/workspace/spark/core/src/main/scala/org/apache/spark/util/AccumulatorV2.scala:459:
 trait AccumulableParam in package spark is deprecated: use AccumulatorV2
    [warn]     param: org.apache.spark.AccumulableParam[R, T]) extends 
AccumulatorV2[T, R] {
    [warn]
    ```
    
    Using `AccumulatorV2` and warnings on "PythonRDD.scala:78" and 
"PythonRDD.scala:71" disappeared. 
    
    I didn't change `AccumulableParam` or `AccumulatorParam`, since they are 
being used in `class LegacyAccumulatorWrapper` of `AccumulatorV2`.
    
    ## How was this patch tested?
    
    Tested manually on my laptop.
    
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/keypointt/spark SPARK-16580

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/14226.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #14226
    
----
commit 84db7265250eef147c8d51e539ace9f9dfc35a19
Author: Xin Ren <[email protected]>
Date:   2016-07-15T20:50:43Z

    compile ok

----


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

Reply via email to