T
- The actual data type wrapped in the Row.public static class PythonConnectorUtils.SecondColumnSerializationSchema<T> extends Object implements SerializationSchema<Row>
SerializationSchema
for Row
that only serialize the second column using a
wrapped SerializationSchema
for T
.SerializationSchema.InitializationContext
Constructor and Description |
---|
SecondColumnSerializationSchema(SerializationSchema<T> wrappedSchema)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
open(SerializationSchema.InitializationContext context)
Initialization method for the schema.
|
byte[] |
serialize(Row row)
Serializes the incoming element to a specified type.
|
public SecondColumnSerializationSchema(SerializationSchema<T> wrappedSchema)
wrappedSchema
- The SerializationSchema
to serialize T
objects.public void open(SerializationSchema.InitializationContext context) throws Exception
SerializationSchema
SerializationSchema.serialize(Object)
and thus suitable for one time setup work.
The provided SerializationSchema.InitializationContext
can be used to access additional features such
as e.g. registering user metrics.
open
in interface SerializationSchema<Row>
context
- Contextual information that can be used during initialization.Exception
public byte[] serialize(Row row)
SerializationSchema
serialize
in interface SerializationSchema<Row>
row
- The incoming element to be serializedCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.