Package org.apache.spark.sql.util
Class MapperRowCounter
Object
org.apache.spark.util.AccumulatorV2<Long,List<scala.Tuple2<Integer,Long>>>
org.apache.spark.sql.util.MapperRowCounter
- All Implemented Interfaces:
Serializable
An AccumulatorV2 counter for collecting a list of (mapper index, row count).
- Since:
- 3.4.0
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Takes the inputs and accumulates.copy()
Creates a new copy of this accumulator.Creates a new copy of this accumulator, which is zero value.boolean
isZero()
Returns false if this accumulator has had any values added to it or the sum is non-zero.void
Merges another same-type accumulator into this one and update its state, i.e.void
reset()
Resets this accumulator, which is zero value.void
value()
Defines the current value of this accumulatorMethods inherited from class org.apache.spark.util.AccumulatorV2
id, isRegistered, name, toString
-
Constructor Details
-
MapperRowCounter
public MapperRowCounter()
-
-
Method Details
-
add
Description copied from class:AccumulatorV2
Takes the inputs and accumulates. -
copy
Description copied from class:AccumulatorV2
Creates a new copy of this accumulator. -
copyAndReset
Description copied from class:AccumulatorV2
Creates a new copy of this accumulator, which is zero value. i.e. callisZero
on the copy must return true.- Overrides:
copyAndReset
in classAccumulatorV2<Long,
List<scala.Tuple2<Integer, Long>>> - Returns:
- (undocumented)
-
isZero
public boolean isZero()Returns false if this accumulator has had any values added to it or the sum is non-zero. -
merge
Description copied from class:AccumulatorV2
Merges another same-type accumulator into this one and update its state, i.e. this should be merge-in-place. -
reset
public void reset()Description copied from class:AccumulatorV2
Resets this accumulator, which is zero value. i.e. callisZero
must return true. -
setPartitionId
-
value
Description copied from class:AccumulatorV2
Defines the current value of this accumulator
-