org.apache.avro.hadoop.io

## Class AvroDatumConverter<INPUT,OUTPUT>

- java.lang.Object
- - org.apache.avro.hadoop.io.AvroDatumConverter<INPUT,OUTPUT>

- Type Parameters:
    `INPUT` - The type of the input Java object to convert.
    `OUTPUT` - The type of the Avro datum to convert to.
  Direct Known Subclasses:
    AvroDatumConverterFactory.AvroWrapperConverter, AvroDatumConverterFactory.BooleanWritableConverter, AvroDatumConverterFactory.BytesWritableConverter, AvroDatumConverterFactory.ByteWritableConverter, AvroDatumConverterFactory.DoubleWritableConverter, AvroDatumConverterFactory.FloatWritableConverter, AvroDatumConverterFactory.IntWritableConverter, AvroDatumConverterFactory.LongWritableConverter, AvroDatumConverterFactory.NullWritableConverter, AvroDatumConverterFactory.TextConverter

      public abstract class AvroDatumConverter<INPUT,OUTPUT>
      extends Object

  Converts a Java object into an Avro datum.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AvroDatumConverter()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract OUTPUT` | `convert(INPUT input)`
    `abstract Schema` | `getWriterSchema()` Gets the writer schema that should be used to serialize the output Avro datum.

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

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

- - ### Constructor Detail

    - #### AvroDatumConverter

          public AvroDatumConverter()

  - ### Method Detail

    - #### convert

          public abstract OUTPUT convert(INPUT input)

    - #### getWriterSchema

          public abstract Schema getWriterSchema()

      Gets the writer schema that should be used to serialize the output Avro datum.
      Returns:
        The writer schema for the output Avro datum.

Copyright © 2009–2024 The Apache Software Foundation. All rights reserved.