@@ -36,23 +36,20 @@ import org.apache.spark.serializer.JavaSerializer
3636 *
3737 * @param initialValue initial value of accumulator
3838 * @param param helper object defining how to add elements of type `R` and `T`
39- * @param _name human-readable name for use in Spark's web UI
40- * @param display whether to show accumulator values Spark's web UI
39+ * @param name human-readable name for use in Spark's web UI
4140 * @tparam R the full accumulated data (result type)
4241 * @tparam T partial data that can be added in
4342 */
4443class Accumulable [R , T ] (
4544 @ transient initialValue : R ,
4645 param : AccumulableParam [R , T ],
47- _name : Option [String ],
48- val display : Boolean )
46+ val name : Option [String ])
4947 extends Serializable {
5048
5149 def this (@ transient initialValue : R , param : AccumulableParam [R , T ]) =
52- this (initialValue, param, None , true )
50+ this (initialValue, param, None )
5351
5452 val id : Long = Accumulators .newId
55- val name = _name.getOrElse(s " accumulator_ $id" )
5653
5754 @ transient private var value_ = initialValue // Current value on master
5855 val zero = param.zero(initialValue) // Zero value to be passed to workers
@@ -228,9 +225,9 @@ GrowableAccumulableParam[R <% Growable[T] with TraversableOnce[T] with Serializa
228225 * @param param helper object defining how to add elements of type `T`
229226 * @tparam T result type
230227 */
231- class Accumulator [T ](@ transient initialValue : T , param : AccumulatorParam [T ], name : Option [String ],
232- display : Boolean ) extends Accumulable [T ,T ](initialValue, param, name, display ) {
233- def this (initialValue : T , param : AccumulatorParam [T ]) = this (initialValue, param, None , false )
228+ class Accumulator [T ](@ transient initialValue : T , param : AccumulatorParam [T ], name : Option [String ])
229+ extends Accumulable [T ,T ](initialValue, param, name) {
230+ def this (initialValue : T , param : AccumulatorParam [T ]) = this (initialValue, param, None )
234231}
235232
236233/**
0 commit comments