Interface DeserializationSchema<T>

    • Method Detail

      • deserialize

        T deserialize​(byte[] message)
               throws IOException
        Deserializes the byte message.
        Parameters:
        message - The message, as a byte array.
        Returns:
        The deserialized message as an object (null if the message cannot be deserialized).
        Throws:
        IOException
      • deserialize

        @PublicEvolving
        default void deserialize​(byte[] message,
                                 Collector<T> out)
                          throws IOException
        Deserializes the byte message.

        Can output multiple records through the Collector. Note that number and size of the produced records should be relatively small. Depending on the source implementation records can be buffered in memory or collecting records might delay emitting checkpoint barrier.

        Parameters:
        message - The message, as a byte array.
        out - The collector to put the resulting messages.
        Throws:
        IOException
      • isEndOfStream

        boolean isEndOfStream​(T nextElement)
        Method to decide whether the element signals the end of the stream. If true is returned the element won't be emitted.
        Parameters:
        nextElement - The element to test for the end-of-stream signal.
        Returns:
        True, if the element signals end of stream, false otherwise.