public class FreqMapParquetSerialiser extends Object implements ParquetSerialiser<FreqMap>
FreqMap value for use by the
ParquetStore.| Constructor and Description |
|---|
FreqMapParquetSerialiser() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canHandle(Class clazz)
Check whether the serialiser can serialise a particular class.
|
FreqMap |
deserialise(Object[] objects)
This method provides the user a way of specifying how to recreate the Plain Old Java Object (POJO)
from the Parquet primitive types.
|
FreqMap |
deserialiseEmpty()
Handle an empty OUTPUT and reconstruct an appropriate representation in Object form.
|
String |
getParquetSchema(String colName)
This method provides the user a way of specifying the Parquet schema for this object.
|
boolean |
isConsistent()
Indicates whether the serialisation process produces a predictable, consistent
OUTPUT, from a given INPUT, ie the same object should always serialise in the same way
for this to be true.
|
boolean |
preservesObjectOrdering()
Indicates whether the serialisation process preserves the ordering of the INPUT,
i.e.
|
Object[] |
serialise(FreqMap object)
This method provides the user a way of specifying how to convert a Plain Old Java Object (POJO)
into the Parquet primitive types.
|
Object[] |
serialiseNull()
Handle an incoming null value and generate an appropriate OUTPUT representation.
|
public String getParquetSchema(String colName)
ParquetSerialisergetParquetSchema in interface ParquetSerialiser<FreqMap>colName - The column name as a String as seen in the Gaffer schema that this object is frompublic Object[] serialise(FreqMap object) throws SerialisationException
ParquetSerialiserserialise in interface ParquetSerialiser<FreqMap>serialise in interface Serialiser<FreqMap,Object[]>object - The POJO that you will convert to Parquet primitivesSerialisationException - If the POJO fails to be converted to ParquetObjects then this will be thrownpublic FreqMap deserialise(Object[] objects) throws SerialisationException
ParquetSerialiserdeserialise in interface ParquetSerialiser<FreqMap>deserialise in interface Serialiser<FreqMap,Object[]>objects - An object array of Parquet primitivesSerialisationException - If the ParquetObjects fails to be converted to a POJO then this will be thrownpublic FreqMap deserialiseEmpty() throws SerialisationException
SerialiserdeserialiseEmpty in interface Serialiser<FreqMap,Object[]>SerialisationException - if the object fails to deserialisepublic boolean preservesObjectOrdering()
SerialiserpreservesObjectOrdering in interface Serialiser<FreqMap,Object[]>public boolean isConsistent()
SerialiserisConsistent in interface Serialiser<FreqMap,Object[]>public Object[] serialiseNull()
SerialiserserialiseNull in interface Serialiser<FreqMap,Object[]>public boolean canHandle(Class clazz)
Serialiser//Warning: Due to erasure you may get false positives. e.g.
Set<Foo> set = Sets.newHashSet();
boolean b = new Serialiser<Set<Bar>, byte[]>().canHandle(set.getClass());
b will incorrectly be true because of type erasure between Set<Foo> Set<Bar>
canHandle in interface Serialiser<FreqMap,Object[]>clazz - the object class to serialiseCopyright © 2022. All rights reserved.