@InterfaceAudience.Public @InterfaceStability.Stable public class ValueAggregatorBaseDescriptor extends Object implements ValueAggregatorDescriptor
| Modifier and Type | Field and Description | 
|---|---|
static String | 
DOUBLE_VALUE_SUM  | 
String | 
inputFile  | 
static String | 
LONG_VALUE_MAX  | 
static String | 
LONG_VALUE_MIN  | 
static String | 
LONG_VALUE_SUM  | 
static String | 
STRING_VALUE_MAX  | 
static String | 
STRING_VALUE_MIN  | 
static String | 
UNIQ_VALUE_COUNT  | 
static String | 
VALUE_HISTOGRAM  | 
ONE, TYPE_SEPARATOR| Constructor and Description | 
|---|
ValueAggregatorBaseDescriptor()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
configure(Configuration conf)
get the input file name. 
 | 
static Map.Entry<Text,Text> | 
generateEntry(String type,
             String id,
             Text val)  | 
ArrayList<Map.Entry<Text,Text>> | 
generateKeyValPairs(Object key,
                   Object val)
Generate 1 or 2 aggregation-id/value pairs for the given key/value pair. 
 | 
static ValueAggregator | 
generateValueAggregator(String type,
                       long uniqCount)  | 
public static final String UNIQ_VALUE_COUNT
public static final String LONG_VALUE_SUM
public static final String DOUBLE_VALUE_SUM
public static final String VALUE_HISTOGRAM
public static final String LONG_VALUE_MAX
public static final String LONG_VALUE_MIN
public static final String STRING_VALUE_MAX
public static final String STRING_VALUE_MIN
public String inputFile
public static Map.Entry<Text,Text> generateEntry(String type, String id, Text val)
type - the aggregation typeid - the aggregation idval - the val associated with the id to be aggregatedpublic static ValueAggregator generateValueAggregator(String type, long uniqCount)
type - the aggregation typeuniqCount - the limit in the number of unique values to keep, 
                  if type is UNIQ_VALUE_COUNTpublic ArrayList<Map.Entry<Text,Text>> generateKeyValPairs(Object key, Object val)
generateKeyValPairs in interface ValueAggregatorDescriptorkey - input keyval - input valuepublic void configure(Configuration conf)
configure in interface ValueAggregatorDescriptorconf - a configuration objectCopyright © 2022 Apache Software Foundation. All rights reserved.