public abstract class AvroUtils extends Object
Constructor and Description |
---|
AvroUtils() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addAvroGenericDataArrayRegistration(LinkedHashMap<String,KryoRegistration> kryoRegistrations)
Registers a special Serializer for GenericData.Array.
|
abstract void |
addAvroSerializersIfRequired(ExecutionConfig reg,
Class<?> type)
Loads the utility class from
flink-avro and adds Avro-specific serializers. |
abstract <T> TypeSerializer<T> |
createAvroSerializer(Class<T> type)
Creates an
AvroSerializer if flink-avro is present, otherwise throws an exception. |
abstract <T> TypeInformation<T> |
createAvroTypeInfo(Class<T> type)
Creates an
AvroTypeInfo if flink-avro is present, otherwise throws an exception. |
static AvroUtils |
getAvroUtils()
Returns either the default
AvroUtils which throw an exception in cases where Avro
would be needed or loads the specific utils for Avro from flink-avro. |
public static AvroUtils getAvroUtils()
AvroUtils
which throw an exception in cases where Avro
would be needed or loads the specific utils for Avro from flink-avro.public abstract void addAvroSerializersIfRequired(ExecutionConfig reg, Class<?> type)
flink-avro
and adds Avro-specific serializers. This
method will throw an exception if we see an Avro type but flink-avro is not in the classpath.public abstract void addAvroGenericDataArrayRegistration(LinkedHashMap<String,KryoRegistration> kryoRegistrations)
public abstract <T> TypeSerializer<T> createAvroSerializer(Class<T> type)
AvroSerializer
if flink-avro is present, otherwise throws an exception.public abstract <T> TypeInformation<T> createAvroTypeInfo(Class<T> type)
AvroTypeInfo
if flink-avro is present, otherwise throws an exception.Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.