Interface KinesisSerializationSchema<T>

  • Type Parameters:
    T -
    All Superinterfaces:
    Serializable

    @PublicEvolving
    public interface KinesisSerializationSchema<T>
    extends Serializable
    Kinesis-specific serialization schema, allowing users to specify a target stream based on a record's contents.
    • Method Detail

      • open

        default void open​(org.apache.flink.api.common.serialization.SerializationSchema.InitializationContext context)
                   throws Exception
        Initialization method for the schema. It is called before the actual working methods 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.

        Parameters:
        context - Contextual information that can be used during initialization.
        Throws:
        Exception
      • serialize

        ByteBuffer serialize​(T element)
        Serialize the given element into a ByteBuffer.
        Parameters:
        element - The element to serialize
        Returns:
        Serialized representation of the element
      • getTargetStream

        String getTargetStream​(T element)
        Optional method to determine the target stream based on the element. Return null to use the default stream
        Parameters:
        element - The element to determine the target stream from
        Returns:
        target stream name