T
- type of record it producespublic class AvroDeserializationSchema<T> extends Object implements DeserializationSchema<T>
DeserializationSchema.InitializationContext
Modifier and Type | Method and Description |
---|---|
T |
deserialize(byte[] message)
Deserializes the byte message.
|
boolean |
equals(Object o) |
static AvroDeserializationSchema<org.apache.avro.generic.GenericRecord> |
forGeneric(org.apache.avro.Schema schema)
Creates
AvroDeserializationSchema that produces GenericRecord using provided
schema. |
static <T extends org.apache.avro.specific.SpecificRecord> |
forSpecific(Class<T> tClass)
Creates
AvroDeserializationSchema that produces classes that were generated from avro
schema. |
TypeInformation<T> |
getProducedType()
Gets the data type (as a
TypeInformation ) produced by this function or input format. |
int |
hashCode() |
boolean |
isEndOfStream(T nextElement)
Method to decide whether the element signals the end of the stream.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
deserialize, open
public static AvroDeserializationSchema<org.apache.avro.generic.GenericRecord> forGeneric(org.apache.avro.Schema schema)
AvroDeserializationSchema
that produces GenericRecord
using provided
schema.schema
- schema of produced recordsGenericRecord
public static <T extends org.apache.avro.specific.SpecificRecord> AvroDeserializationSchema<T> forSpecific(Class<T> tClass)
AvroDeserializationSchema
that produces classes that were generated from avro
schema.tClass
- class of record to be producedpublic T deserialize(@Nullable byte[] message) throws IOException
DeserializationSchema
deserialize
in interface DeserializationSchema<T>
message
- The message, as a byte array.IOException
public boolean isEndOfStream(T nextElement)
DeserializationSchema
isEndOfStream
in interface DeserializationSchema<T>
nextElement
- The element to test for the end-of-stream signal.public TypeInformation<T> getProducedType()
ResultTypeQueryable
TypeInformation
) produced by this function or input format.getProducedType
in interface ResultTypeQueryable<T>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.