T - The type to serialize@Internal public class KeyedSerializationSchemaWrapper<T> extends Object implements KeyedSerializationSchema<T>
| 构造器和说明 |
|---|
KeyedSerializationSchemaWrapper(org.apache.flink.api.common.serialization.SerializationSchema<T> serializationSchema) |
| 限定符和类型 | 方法和说明 |
|---|---|
org.apache.flink.api.common.serialization.SerializationSchema<T> |
getSerializationSchema() |
String |
getTargetTopic(T element)
Optional method to determine the target topic for the element.
|
byte[] |
serializeKey(T element)
Serializes the key of the incoming element to a byte array This method might return null if
no key is available.
|
byte[] |
serializeValue(T element)
Serializes the value of the incoming element to a byte array.
|
public KeyedSerializationSchemaWrapper(org.apache.flink.api.common.serialization.SerializationSchema<T> serializationSchema)
public org.apache.flink.api.common.serialization.SerializationSchema<T> getSerializationSchema()
public byte[] serializeKey(T element)
KeyedSerializationSchemaserializeKey 在接口中 KeyedSerializationSchema<T>element - The incoming element to be serializedpublic byte[] serializeValue(T element)
KeyedSerializationSchemaserializeValue 在接口中 KeyedSerializationSchema<T>element - The incoming element to be serializedpublic String getTargetTopic(T element)
KeyedSerializationSchemagetTargetTopic 在接口中 KeyedSerializationSchema<T>element - Incoming element to determine the target topic fromCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.