org.apache.storm.hdfs.avro

## Class ConfluentAvroSerializer

- java.lang.Object
- - com.esotericsoftware.kryo.Serializer<org.apache.avro.generic.GenericContainer>
  - - org.apache.storm.hdfs.avro.AbstractAvroSerializer
    - - org.apache.storm.hdfs.avro.ConfluentAvroSerializer

- All Implemented Interfaces:
    Serializable, AvroSchemaRegistry

      public class ConfluentAvroSerializer
      extends AbstractAvroSerializer

  This class provides a mechanism to utilize the Confluent Schema Registry (https://github.com/confluentinc/schema-registry) for Storm to (de)serialize Avro generic records across a topology. It assumes the schema registry is up and running completely independent of Storm.

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConfluentAvroSerializer(com.esotericsoftware.kryo.Kryo k, Map<String,Object> topoConf)` A constructor with a signature that Storm can locate and use with kryo registration.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getFingerprint(org.apache.avro.Schema schema)`
    `org.apache.avro.Schema` | `getSchema(String fingerPrint)`

    - ### Methods inherited from class org.apache.storm.hdfs.avro.AbstractAvroSerializer

      `read, write`

    - ### Methods inherited from class com.esotericsoftware.kryo.Serializer

      `copy, getAcceptsNull, isImmutable, setAcceptsNull, setGenerics, setImmutable`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ConfluentAvroSerializer

          public ConfluentAvroSerializer(com.esotericsoftware.kryo.Kryo k,
                                         Map<String,Object> topoConf)

      A constructor with a signature that Storm can locate and use with kryo registration. See Storm’s SerializationFactory class for details

      Parameters:
        `k` - Unused but needs to be present for Serialization Factory to find this constructor
        `topoConf` - The global storm configuration. Must define “avro.schemaregistry.confluent” to locate the confluent schema registry. Should in the form of “http://HOST:PORT”

  - ### Method Detail

    - #### getFingerprint

          public String getFingerprint(org.apache.avro.Schema schema)

    - #### getSchema

          public org.apache.avro.Schema getSchema(String fingerPrint)

Copyright © 2021 The Apache Software Foundation. All rights reserved.