public class AvroKryoSerializerUtils extends AvroUtils
Modifier and Type | Class and Description |
---|---|
static class |
AvroKryoSerializerUtils.AvroSchemaSerializer
Slow serialization approach for Avro schemas.
|
Constructor and Description |
---|
AvroKryoSerializerUtils() |
Modifier and Type | Method and Description |
---|---|
void |
addAvroGenericDataArrayRegistration(LinkedHashMap<String,KryoRegistration> kryoRegistrations)
Registers a special Serializer for GenericData.Array.
|
void |
addAvroSerializersIfRequired(SerializerConfig reg,
Class<?> type)
Loads the utility class from
flink-avro and adds Avro-specific serializers. |
<T> TypeSerializer<T> |
createAvroSerializer(Class<T> type)
Creates an
AvroSerializer if flink-avro is present, otherwise throws an exception. |
<T> TypeInformation<T> |
createAvroTypeInfo(Class<T> type)
Creates an
AvroTypeInfo if flink-avro is present, otherwise throws an exception. |
getAvroUtils
public void addAvroSerializersIfRequired(SerializerConfig reg, Class<?> type)
AvroUtils
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.addAvroSerializersIfRequired
in class AvroUtils
public void addAvroGenericDataArrayRegistration(LinkedHashMap<String,KryoRegistration> kryoRegistrations)
AvroUtils
addAvroGenericDataArrayRegistration
in class AvroUtils
public <T> TypeSerializer<T> createAvroSerializer(Class<T> type)
AvroUtils
AvroSerializer
if flink-avro is present, otherwise throws an exception.createAvroSerializer
in class AvroUtils
public <T> TypeInformation<T> createAvroTypeInfo(Class<T> type)
AvroUtils
AvroTypeInfo
if flink-avro is present, otherwise throws an exception.createAvroTypeInfo
in class AvroUtils
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.