AvroSpecificSerialization (Apache Hadoop Main 3.5.0 API)
Description: declaration: package: org.apache.hadoop.io.serializer.avro, class: AvroSpecificSerialization

Package org.apache.hadoop.io.serializer.avro

# Class AvroSpecificSerialization

java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.io.serializer.avro.AvroSerialization<org.apache.avro.specific.SpecificRecord>
org.apache.hadoop.io.serializer.avro.AvroSpecificSerialization

All Implemented Interfaces:
  `Configurable`, `org.apache.hadoop.io.serializer.Serialization<org.apache.avro.specific.SpecificRecord>`

@Public @Evolving public class AvroSpecificSerialization extends AvroSerialization<org.apache.avro.specific.SpecificRecord>
Serialization for Avro Specific classes. This serialization is to be used for classes generated by Avro's 'specific' compiler.

- ## Field Summary

  ### Fields inherited from class org.apache.hadoop.io.serializer.avro.AvroSerialization

  `AVRO_SCHEMA_KEY`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AvroSpecificSerialization()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `accept(Class<?> c)`
  Allows clients to test whether this `Serialization` supports the given class.
  `org.apache.avro.io.DatumReader`
  `getReader(Class<org.apache.avro.specific.SpecificRecord> clazz)`
  Create and return Avro DatumReader for the given class.
  `org.apache.avro.Schema`
  `getSchema(org.apache.avro.specific.SpecificRecord t)`
  Return an Avro Schema instance for the given class.
  `org.apache.avro.io.DatumWriter`
  `getWriter(Class<org.apache.avro.specific.SpecificRecord> clazz)`
  Create and return Avro DatumWriter for the given class.

  ### Methods inherited from class org.apache.hadoop.io.serializer.avro.AvroSerialization

  `getDeserializer, getSerializer`

  ### Methods inherited from class org.apache.hadoop.conf.Configured

  `getConf, setConf`

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

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

- ## Constructor Details

  - ### AvroSpecificSerialization

    public AvroSpecificSerialization()

- ## Method Details

  - ### accept

    @Private public boolean accept(Class<?> c)
    Description copied from interface: `org.apache.hadoop.io.serializer.Serialization`
    Allows clients to test whether this `Serialization` supports the given class.
    Parameters:
      `c` - class.
    Returns:
      if accept true,not false.

  - ### getReader

    @Private public org.apache.avro.io.DatumReader getReader(Class<org.apache.avro.specific.SpecificRecord> clazz)
    Description copied from class: `AvroSerialization`
    Create and return Avro DatumReader for the given class.
    Parameters:
      `clazz` - clazz.
    Returns:
      DatumReader.

  - ### getSchema

    @Private public org.apache.avro.Schema getSchema(org.apache.avro.specific.SpecificRecord t)
    Description copied from class: `AvroSerialization`
    Return an Avro Schema instance for the given class.
    Parameters:
      `t` - Generics Type T.
    Returns:
      schema.

  - ### getWriter

    @Private public org.apache.avro.io.DatumWriter getWriter(Class<org.apache.avro.specific.SpecificRecord> clazz)
    Description copied from class: `AvroSerialization`
    Create and return Avro DatumWriter for the given class.
    Parameters:
      `clazz` - clazz.
    Returns:
      DatumWriter.