T
- The type of the accumulated objects@PublicEvolving public class SerializedListAccumulator<T> extends Object implements Accumulator<T,ArrayList<byte[]>>
Constructor and Description |
---|
SerializedListAccumulator() |
Modifier and Type | Method and Description |
---|---|
void |
add(T value) |
void |
add(T value,
TypeSerializer<T> serializer) |
SerializedListAccumulator<T> |
clone()
Duplicates the accumulator.
|
static <T> List<T> |
deserializeList(ArrayList<byte[]> data,
TypeSerializer<T> serializer) |
ArrayList<byte[]> |
getLocalValue() |
void |
merge(Accumulator<T,ArrayList<byte[]>> other)
Used by system internally to merge the collected parts of an accumulator
at the end of the job.
|
void |
resetLocal()
Reset the local value.
|
String |
toString() |
public void add(T value)
add
in interface Accumulator<T,ArrayList<byte[]>>
value
- The value to add to the accumulator objectpublic void add(T value, TypeSerializer<T> serializer) throws IOException
IOException
public ArrayList<byte[]> getLocalValue()
getLocalValue
in interface Accumulator<T,ArrayList<byte[]>>
public void resetLocal()
Accumulator
resetLocal
in interface Accumulator<T,ArrayList<byte[]>>
public void merge(Accumulator<T,ArrayList<byte[]>> other)
Accumulator
merge
in interface Accumulator<T,ArrayList<byte[]>>
other
- Reference to accumulator to merge in.public SerializedListAccumulator<T> clone()
Accumulator
CloneNotSupportedException
public static <T> List<T> deserializeList(ArrayList<byte[]> data, TypeSerializer<T> serializer) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.