Class KafkaDeserializationSchemaWrapper<T>

java.lang.Object
org.apache.flink.streaming.connectors.kafka.internals.KafkaDeserializationSchemaWrapper<T>
Type Parameters:
T - The type created by the deserialization schema.
All Implemented Interfaces:
Serializable, org.apache.flink.api.java.typeutils.ResultTypeQueryable<T>, KafkaDeserializationSchema<T>

@Internal @Deprecated public class KafkaDeserializationSchemaWrapper<T> extends Object implements KafkaDeserializationSchema<T>
Deprecated.
A simple wrapper for using the DeserializationSchema with the KafkaDeserializationSchema interface.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    KafkaDeserializationSchemaWrapper(org.apache.flink.api.common.serialization.DeserializationSchema<T> deserializationSchema)
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    deserialize(org.apache.kafka.clients.consumer.ConsumerRecord<byte[],byte[]> record)
    Deprecated.
    Deserializes the Kafka record.
    void
    deserialize(org.apache.kafka.clients.consumer.ConsumerRecord<byte[],byte[]> message, org.apache.flink.util.Collector<T> out)
    Deprecated.
    Deserializes the Kafka record.
    org.apache.flink.api.common.typeinfo.TypeInformation<T>
    Deprecated.
     
    boolean
    isEndOfStream(T nextElement)
    Deprecated.
    Method to decide whether the element signals the end of the stream.
    void
    open(org.apache.flink.api.common.serialization.DeserializationSchema.InitializationContext context)
    Deprecated.
    Initialization method for the schema.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • KafkaDeserializationSchemaWrapper

      public KafkaDeserializationSchemaWrapper(org.apache.flink.api.common.serialization.DeserializationSchema<T> deserializationSchema)
      Deprecated.
  • Method Details

    • open

      public void open(org.apache.flink.api.common.serialization.DeserializationSchema.InitializationContext context) throws Exception
      Deprecated.
      Description copied from interface: KafkaDeserializationSchema
      Initialization method for the schema. It is called before the actual working methods KafkaDeserializationSchema.deserialize(org.apache.kafka.clients.consumer.ConsumerRecord<byte[], 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.

      Specified by:
      open in interface KafkaDeserializationSchema<T>
      Parameters:
      context - Contextual information that can be used during initialization.
      Throws:
      Exception
    • deserialize

      public T deserialize(org.apache.kafka.clients.consumer.ConsumerRecord<byte[],byte[]> record) throws Exception
      Deprecated.
      Description copied from interface: KafkaDeserializationSchema
      Deserializes the Kafka record.
      Specified by:
      deserialize in interface KafkaDeserializationSchema<T>
      Parameters:
      record - Kafka record to be deserialized.
      Returns:
      The deserialized message as an object (null if the message cannot be deserialized).
      Throws:
      Exception
    • deserialize

      public void deserialize(org.apache.kafka.clients.consumer.ConsumerRecord<byte[],byte[]> message, org.apache.flink.util.Collector<T> out) throws Exception
      Deprecated.
      Description copied from interface: KafkaDeserializationSchema
      Deserializes the Kafka record.

      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.

      Specified by:
      deserialize in interface KafkaDeserializationSchema<T>
      Parameters:
      message - The message, as a byte array.
      out - The collector to put the resulting messages.
      Throws:
      Exception
    • isEndOfStream

      public boolean isEndOfStream(T nextElement)
      Deprecated.
      Description copied from interface: KafkaDeserializationSchema
      Method to decide whether the element signals the end of the stream. If true is returned the element won't be emitted.
      Specified by:
      isEndOfStream in interface KafkaDeserializationSchema<T>
      Parameters:
      nextElement - The element to test for the end-of-stream signal.
      Returns:
      True, if the element signals end of stream, false otherwise.
    • getProducedType

      public org.apache.flink.api.common.typeinfo.TypeInformation<T> getProducedType()
      Deprecated.
      Specified by:
      getProducedType in interface org.apache.flink.api.java.typeutils.ResultTypeQueryable<T>