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
IOExceptionpublic ArrayList<byte[]> getLocalValue()
getLocalValue in interface Accumulator<T,ArrayList<byte[]>>public void resetLocal()
AccumulatorresetLocal in interface Accumulator<T,ArrayList<byte[]>>public void merge(Accumulator<T,ArrayList<byte[]>> other)
Accumulatormerge in interface Accumulator<T,ArrayList<byte[]>>other - Reference to accumulator to merge in.public SerializedListAccumulator<T> clone()
AccumulatorCloneNotSupportedExceptionpublic static <T> List<T> deserializeList(ArrayList<byte[]> data, TypeSerializer<T> serializer) throws IOException, ClassNotFoundException
IOExceptionClassNotFoundExceptionCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.