Class AvroFileFormat<T>

  • Type Parameters:
    T - type of items a source using this file format will emit
    All Implemented Interfaces:
    FileFormat<T>, java.io.Serializable

    public class AvroFileFormat<T>
    extends java.lang.Object
    implements FileFormat<T>
    FileFormat for avro files. See FileFormat.avro() for more details.
    Since:
    Jet 4.4
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String FORMAT_AVRO
      Format id for Avro.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.lang.String format()
      Returns the name of the file format.
      int hashCode()  
      java.lang.Class<T> reflectClass()
      Returns the class Jet will deserialize data into (using reflection).
      AvroFileFormat<T> withReflect​(java.lang.Class<T> reflectClass)
      Specifies to use reflection to deserialize data into the given class.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • FORMAT_AVRO

        public static final java.lang.String FORMAT_AVRO
        Format id for Avro.
        See Also:
        Constant Field Values
    • Method Detail

      • withReflect

        @Nonnull
        public AvroFileFormat<T> withReflect​(@Nullable
                                             java.lang.Class<T> reflectClass)
        Specifies to use reflection to deserialize data into the given class. Jet will use the ReflectDatumReader to read Avro data. The parameter may be null, this disables the option to deserialize using reflection.
        Parameters:
        reflectClass - class to deserialize data into
      • reflectClass

        @Nullable
        public java.lang.Class<T> reflectClass()
        Returns the class Jet will deserialize data into (using reflection). Null if not set.
      • format

        @Nonnull
        public java.lang.String format()
        Description copied from interface: FileFormat
        Returns the name of the file format. The convention is to use the well-known filename suffix or, if there is none, a short-form name of the format.
        Specified by:
        format in interface FileFormat<T>
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object