T - The type to be serialized.@Public public class TypeInformationSerializationSchema<T> extends Object implements DeserializationSchema<T>, SerializationSchema<T>
| Constructor and Description |
|---|
TypeInformationSerializationSchema(TypeInformation<T> typeInfo,
ExecutionConfig ec)
Creates a new de-/serialization schema for the given type.
|
TypeInformationSerializationSchema(TypeInformation<T> typeInfo,
TypeSerializer<T> serializer)
Creates a new de-/serialization schema for the given type.
|
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize(byte[] message)
Deserializes the byte message.
|
TypeInformation<T> |
getProducedType()
Gets the data type (as a
TypeInformation) produced by this function or input format. |
boolean |
isEndOfStream(T nextElement)
This schema never considers an element to signal end-of-stream, so this method returns always false.
|
byte[] |
serialize(T element)
Serializes the incoming element to a specified type.
|
public TypeInformationSerializationSchema(TypeInformation<T> typeInfo, ExecutionConfig ec)
typeInfo - The type information for the type de-/serialized by this schema.ec - The execution config, which is used to parametrize the type serializers.public TypeInformationSerializationSchema(TypeInformation<T> typeInfo, TypeSerializer<T> serializer)
typeInfo - The type information for the type de-/serialized by this schema.serializer - The serializer to use for de-/serialization.public T deserialize(byte[] message)
DeserializationSchemadeserialize in interface DeserializationSchema<T>message - The message, as a byte array.public boolean isEndOfStream(T nextElement)
isEndOfStream in interface DeserializationSchema<T>nextElement - The element to test for the end-of-stream signal.public byte[] serialize(T element)
SerializationSchemaserialize in interface SerializationSchema<T>element - The incoming element to be serializedpublic TypeInformation<T> getProducedType()
ResultTypeQueryableTypeInformation) produced by this function or input format.getProducedType in interface ResultTypeQueryable<T>Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.