Class ConfluentRegistryAvroDeserializationSchema<T>

    • Method Detail

      • forGeneric

        public static ConfluentRegistryAvroDeserializationSchema<org.apache.avro.generic.GenericRecord> forGeneric​(org.apache.avro.Schema schema,
                                                                                                                   String url)
        Creates ConfluentRegistryAvroDeserializationSchema that produces GenericRecord using the provided reader schema and looks up the writer schema in the Confluent Schema Registry.

        By default, this method supports up to 1000 cached schema versions.

        Parameters:
        schema - schema of produced records
        url - url of schema registry to connect
        Returns:
        deserialized record in form of GenericRecord
      • forGeneric

        public static ConfluentRegistryAvroDeserializationSchema<org.apache.avro.generic.GenericRecord> forGeneric​(org.apache.avro.Schema schema,
                                                                                                                   String url,
                                                                                                                   int identityMapCapacity)
        Creates ConfluentRegistryAvroDeserializationSchema that produces GenericRecord using the provided reader schema and looks up the writer schema in the Confluent Schema Registry.
        Parameters:
        schema - schema of produced records
        url - url of schema registry to connect
        identityMapCapacity - maximum number of cached schema versions
        Returns:
        deserialized record in form of GenericRecord
      • forGeneric

        public static ConfluentRegistryAvroDeserializationSchema<org.apache.avro.generic.GenericRecord> forGeneric​(org.apache.avro.Schema schema,
                                                                                                                   String url,
                                                                                                                   @Nullable
                                                                                                                   Map<String,​?> registryConfigs)
        Creates ConfluentRegistryAvroDeserializationSchema that produces GenericRecord using the provided reader schema and looks up the writer schema in the Confluent Schema Registry.

        By default, this method supports up to 1000 cached schema versions.

        Parameters:
        schema - schema of produced records
        url - URL of schema registry to connect
        registryConfigs - map with additional schema registry configs (for example SSL properties)
        Returns:
        deserialized record in form of GenericRecord
      • forGeneric

        public static ConfluentRegistryAvroDeserializationSchema<org.apache.avro.generic.GenericRecord> forGeneric​(org.apache.avro.Schema schema,
                                                                                                                   String url,
                                                                                                                   int identityMapCapacity,
                                                                                                                   @Nullable
                                                                                                                   Map<String,​?> registryConfigs)
        Creates ConfluentRegistryAvroDeserializationSchema that produces GenericRecord using the provided reader schema and looks up the writer schema in the Confluent Schema Registry.
        Parameters:
        schema - schema of produced records
        url - URL of schema registry to connect
        identityMapCapacity - maximum number of cached schema versions
        registryConfigs - map with additional schema registry configs (for example SSL properties)
        Returns:
        deserialized record in form of GenericRecord
      • forSpecific

        public static <T extends org.apache.avro.specific.SpecificRecord> ConfluentRegistryAvroDeserializationSchema<T> forSpecific​(Class<T> tClass,
                                                                                                                                    String url)
        Creates AvroDeserializationSchema that produces classes that were generated from Avro schema and looks up the writer schema in the Confluent Schema Registry.

        By default, this method supports up to 1000 cached schema versions.

        Parameters:
        tClass - class of record to be produced
        url - url of schema registry to connect
        Returns:
        deserialized record
      • forSpecific

        public static <T extends org.apache.avro.specific.SpecificRecord> ConfluentRegistryAvroDeserializationSchema<T> forSpecific​(Class<T> tClass,
                                                                                                                                    String url,
                                                                                                                                    int identityMapCapacity)
        Creates AvroDeserializationSchema that produces classes that were generated from Avro schema and looks up the writer schema in the Confluent Schema Registry.
        Parameters:
        tClass - class of record to be produced
        url - url of schema registry to connect
        identityMapCapacity - maximum number of cached schema versions
        Returns:
        deserialized record
      • forSpecific

        public static <T extends org.apache.avro.specific.SpecificRecord> ConfluentRegistryAvroDeserializationSchema<T> forSpecific​(Class<T> tClass,
                                                                                                                                    String url,
                                                                                                                                    @Nullable
                                                                                                                                    Map<String,​?> registryConfigs)
        Creates AvroDeserializationSchema that produces classes that were generated from Avro schema and looks up the writer schema in the Confluent Schema Registry.

        By default, this method supports up to 1000 cached schema versions.

        Parameters:
        tClass - class of record to be produced
        url - URL of schema registry to connect
        registryConfigs - map with additional schema registry configs (for example SSL properties)
        Returns:
        deserialized record
      • forSpecific

        public static <T extends org.apache.avro.specific.SpecificRecord> ConfluentRegistryAvroDeserializationSchema<T> forSpecific​(Class<T> tClass,
                                                                                                                                    String url,
                                                                                                                                    int identityMapCapacity,
                                                                                                                                    @Nullable
                                                                                                                                    Map<String,​?> registryConfigs)
        Creates AvroDeserializationSchema that produces classes that were generated from Avro schema and looks up the writer schema in the Confluent Schema Registry.
        Parameters:
        tClass - class of record to be produced
        url - URL of schema registry to connect
        identityMapCapacity - maximum number of cached schema versions
        registryConfigs - map with additional schema registry configs (for example SSL properties)
        Returns:
        deserialized record