Constructor and Description |
---|
AccumulatorHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
compareAccumulatorTypes(Object name,
Class<? extends Accumulator> first,
Class<? extends Accumulator> second)
Compare both classes and throw
UnsupportedOperationException if
they differ |
static Map<String,Accumulator<?,?>> |
copy(Map<String,Accumulator<?,?>> accumulators) |
static Map<String,Object> |
deserializeAccumulators(Map<String,SerializedValue<Object>> serializedAccumulators,
ClassLoader loader)
Takes the serialized accumulator results and tries to deserialize them using the provided
class loader.
|
static String |
getResultsFormated(Map<String,Object> map) |
static void |
mergeInto(Map<String,Accumulator<?,?>> target,
Map<String,Accumulator<?,?>> toMerge)
Merge two collections of accumulators.
|
static Map<String,Object> |
toResultMap(Map<String,Accumulator<?,?>> accumulators)
Transform the Map with accumulators into a Map containing only the
results
|
public static void mergeInto(Map<String,Accumulator<?,?>> target, Map<String,Accumulator<?,?>> toMerge)
target
- The collection of accumulators that will be updatedtoMerge
- The collection of accumulators that will be merged into the
otherpublic static void compareAccumulatorTypes(Object name, Class<? extends Accumulator> first, Class<? extends Accumulator> second) throws UnsupportedOperationException
UnsupportedOperationException
if
they differUnsupportedOperationException
public static Map<String,Object> toResultMap(Map<String,Accumulator<?,?>> accumulators)
public static Map<String,Accumulator<?,?>> copy(Map<String,Accumulator<?,?>> accumulators)
public static Map<String,Object> deserializeAccumulators(Map<String,SerializedValue<Object>> serializedAccumulators, ClassLoader loader) throws IOException, ClassNotFoundException
serializedAccumulators
- The serialized accumulator results.loader
- The class loader to use.IOException
ClassNotFoundException
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.