Constructor and Description |
---|
GenericRecordAsMap(org.apache.avro.generic.GenericRecord record,
boolean fromPigAvroStorage,
boolean binaryAsString) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<String,Object>> |
entrySet() |
Object |
get(Object key)
When used in MapBasedRow, field in GenericRecord will be interpret as follows:
avro schema type -> druid dimension:
null, boolean, int, long, float, double, string, Records, Enums, Maps, Fixed -> String, using String.valueOf
bytes -> Arrays.toString() or new String if binaryAsString is true
Arrays -> List<String>, using Lists.transform(<List>dimValue, TO_STRING_INCLUDING_NULL)
avro schema type -> druid metric:
null -> 0F/0L
int, long, float, double -> Float/Long, using Number.floatValue()/Number.longValue()
string -> Float/Long, using Float.valueOf()/Long.valueOf()
boolean, bytes, Arrays, Records, Enums, Maps, Fixed -> ParseException
|
boolean |
isEmpty() |
Set<String> |
keySet() |
Object |
put(String key,
Object value) |
void |
putAll(Map<? extends String,?> m) |
Object |
remove(Object key) |
int |
size() |
Collection<Object> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
public GenericRecordAsMap(org.apache.avro.generic.GenericRecord record, boolean fromPigAvroStorage, boolean binaryAsString)
public boolean containsKey(Object key)
containsKey
in interface Map<String,Object>
public boolean containsValue(Object value)
containsValue
in interface Map<String,Object>
public Object get(Object key)
Copyright © 2011–2017. All rights reserved.