DeserializationSchema
.@PublicEvolving @Deprecated 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
Deprecated.
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)
Deprecated.
Deserializes the byte message.
|
boolean |
equals(Object o)
Deprecated.
|
TypeInformation<Row> |
getProducedType()
Deprecated.
Gets the data type (as a
TypeInformation ) produced by this function or input format. |
int |
hashCode()
Deprecated.
|
boolean |
isEndOfStream(Row nextElement)
Deprecated.
Method to decide whether the element signals the end of the stream.
|
void |
open(DeserializationSchema.InitializationContext context)
Deprecated.
Initialization method for the schema.
|
void |
setFailOnMissingField(boolean failOnMissingField)
Deprecated.
Use the provided
JsonRowDeserializationSchema.Builder instead. |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
deserialize
@Deprecated public JsonRowDeserializationSchema(TypeInformation<Row> typeInfo)
JsonRowDeserializationSchema.Builder
instead.@Deprecated public JsonRowDeserializationSchema(String jsonSchema)
JsonRowDeserializationSchema.Builder
instead.public void open(DeserializationSchema.InitializationContext context) throws Exception
DeserializationSchema
DeserializationSchema.deserialize(byte[])
and thus suitable for one time setup work.
The provided DeserializationSchema.InitializationContext
can be used to access additional features such
as e.g. registering user metrics.
open
in interface DeserializationSchema<Row>
context
- Contextual information that can be used during initialization.Exception
@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–2024 The Apache Software Foundation. All rights reserved.