@PublicEvolving public class JsonRowDeserializationSchema extends Object implements DeserializationSchema<Row>
Deserializes a byte[]
message as a JSON object and reads the specified fields.
Failures during deserialization are forwarded as wrapped IOExceptions.
Modifier and Type | Class and Description |
---|---|
static class |
JsonRowDeserializationSchema.Builder
Builder for
JsonRowDeserializationSchema . |
DeserializationSchema.InitializationContext
Constructor and Description |
---|
JsonRowDeserializationSchema(String jsonSchema)
Deprecated.
Use the provided
JsonRowDeserializationSchema.Builder instead. |
JsonRowDeserializationSchema(TypeInformation<Row> typeInfo)
Deprecated.
Use the provided
JsonRowDeserializationSchema.Builder instead. |
Modifier and Type | Method and Description |
---|---|
Row |
deserialize(byte[] message)
Deserializes the byte message.
|
boolean |
equals(Object o) |
TypeInformation<Row> |
getProducedType()
Gets the data type (as a
TypeInformation ) produced by this function or input format. |
int |
hashCode() |
boolean |
isEndOfStream(Row nextElement)
Method to decide whether the element signals the end of the stream.
|
void |
setFailOnMissingField(boolean failOnMissingField)
Deprecated.
Use the provided
JsonRowDeserializationSchema.Builder instead. |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
deserialize, open
@Deprecated public JsonRowDeserializationSchema(TypeInformation<Row> typeInfo)
JsonRowDeserializationSchema.Builder
instead.@Deprecated public JsonRowDeserializationSchema(String jsonSchema)
JsonRowDeserializationSchema.Builder
instead.@Deprecated public void setFailOnMissingField(boolean failOnMissingField)
JsonRowDeserializationSchema.Builder
instead.public Row deserialize(byte[] message) throws IOException
DeserializationSchema
deserialize
in interface DeserializationSchema<Row>
message
- The message, as a byte array.IOException
public boolean isEndOfStream(Row nextElement)
DeserializationSchema
isEndOfStream
in interface DeserializationSchema<Row>
nextElement
- The element to test for the end-of-stream signal.public TypeInformation<Row> getProducedType()
ResultTypeQueryable
TypeInformation
) produced by this function or input format.getProducedType
in interface ResultTypeQueryable<Row>
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.