Skip to content

Commit 2b5f5a4

Browse files
committed
Comments for the deprecated functions
1 parent 52353de commit 2b5f5a4

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

core/src/main/scala/org/apache/spark/Accumulators.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,8 @@ object AccumulatorParam {
270270
def addInPlace(t1: Float, t2: Float) = t1 + t2
271271
def zero(initialValue: Float) = 0f
272272
}
273+
274+
// TODO: Add AccumulatorParams for other types, e.g. lists and strings
273275
}
274276

275277
// TODO: The multi-thread support in accumulators is kind of lame; check

core/src/main/scala/org/apache/spark/SparkContext.scala

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1428,6 +1428,11 @@ object SparkContext extends Logging {
14281428

14291429
private[spark] val DRIVER_IDENTIFIER = "<driver>"
14301430

1431+
// The following deprecated objects have already been copied to `object AccumulatorParam` to
1432+
// make the compiler find them automatically. They are duplicate codes only for backward
1433+
// compatibility, please update `object AccumulatorParam` accordingly if you plan to modify the
1434+
// following ones.
1435+
14311436
@deprecated("Replaced by implicit objects in AccumulatorParam. This is kept here only for " +
14321437
"backward compatibility.", "1.2.0")
14331438
object DoubleAccumulatorParam extends AccumulatorParam[Double] {
@@ -1456,7 +1461,10 @@ object SparkContext extends Logging {
14561461
def zero(initialValue: Float) = 0f
14571462
}
14581463

1459-
// TODO: Add AccumulatorParams for other types, e.g. lists and strings
1464+
// The following deprecated functions have already been copied to `org.apache.spark.rdd` package
1465+
// object to make the compiler find them automatically. They are duplicate codes only for backward
1466+
// compatibility, please update `org.apache.spark.rdd` package object accordingly if you plan to
1467+
// modify the following ones.
14601468

14611469
@deprecated("Replaced by implicit functions in org.apache.spark.rdd package object. This is " +
14621470
"kept here only for backward compatibility.", "1.2.0")
@@ -1514,6 +1522,11 @@ object SparkContext extends Logging {
15141522
arr.map(x => anyToWritable(x)).toArray)
15151523
}
15161524

1525+
// The following deprecated functions have already been copied to `object WritableConverter` to
1526+
// make the compiler find them automatically. They are duplicate codes only for backward
1527+
// compatibility, please update `object WritableConverter` accordingly if you plan to modify the
1528+
// following ones.
1529+
15171530
@deprecated("Replaced by implicit functions in WritableConverter. This is kept here only for " +
15181531
"backward compatibility.", "1.2.0")
15191532
def intWritableConverter(): WritableConverter[Int] =

0 commit comments

Comments
 (0)