Package org.apache.spark.util
Class CollectionAccumulator<T>
Object
org.apache.spark.util.AccumulatorV2<T,List<T>>
 
org.apache.spark.util.CollectionAccumulator<T>
- All Implemented Interfaces:
- Serializable
An 
accumulator for collecting a list of elements.
 - Since:
- 2.0.0
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidTakes the inputs and accumulates.copy()Creates a new copy of this accumulator.Creates a new copy of this accumulator, which is zero value.booleanisZero()Returns false if this accumulator instance has any values in it.voidmerge(AccumulatorV2<T, List<T>> other) Merges another same-type accumulator into this one and update its state, i.e.voidreset()Resets this accumulator, which is zero value.value()Defines the current value of this accumulatorMethods inherited from class org.apache.spark.util.AccumulatorV2excludeFromHeartbeat, id, isRegistered, name, toString
- 
Constructor Details- 
CollectionAccumulatorpublic CollectionAccumulator()
 
- 
- 
Method Details- 
addDescription copied from class:AccumulatorV2Takes the inputs and accumulates.- Specified by:
- addin class- AccumulatorV2<T,- List<T>> 
- Parameters:
- v- (undocumented)
 
- 
copyDescription copied from class:AccumulatorV2Creates a new copy of this accumulator.- Specified by:
- copyin class- AccumulatorV2<T,- List<T>> 
- Returns:
- (undocumented)
 
- 
copyAndResetDescription copied from class:AccumulatorV2Creates a new copy of this accumulator, which is zero value. i.e. callisZeroon the copy must return true.- Overrides:
- copyAndResetin class- AccumulatorV2<T,- List<T>> 
- Returns:
- (undocumented)
 
- 
isZeropublic boolean isZero()Returns false if this accumulator instance has any values in it.- Specified by:
- isZeroin class- AccumulatorV2<T,- List<T>> 
- Returns:
- (undocumented)
 
- 
mergeDescription copied from class:AccumulatorV2Merges another same-type accumulator into this one and update its state, i.e. this should be merge-in-place.- Specified by:
- mergein class- AccumulatorV2<T,- List<T>> 
- Parameters:
- other- (undocumented)
 
- 
resetpublic void reset()Description copied from class:AccumulatorV2Resets this accumulator, which is zero value. i.e. callisZeromust return true.- Specified by:
- resetin class- AccumulatorV2<T,- List<T>> 
 
- 
valueDescription copied from class:AccumulatorV2Defines the current value of this accumulator- Specified by:
- valuein class- AccumulatorV2<T,- List<T>> 
- Returns:
- (undocumented)
 
 
-