Class DeterministicMapOrderSpecificDatumWriter<T>

java.lang.Object
org.apache.avro.generic.GenericDatumWriter<T>
org.apache.avro.specific.SpecificDatumWriter<T>
org.apache.avro.specific.DeterministicMapOrderSpecificDatumWriter<T>
All Implemented Interfaces:
DeterministicMapOrderDatumWriter, org.apache.avro.io.DatumWriter<T>

public class DeterministicMapOrderSpecificDatumWriter<T> extends org.apache.avro.specific.SpecificDatumWriter<T> implements DeterministicMapOrderDatumWriter
An Avro specific datum writer that sorts the map entries by keys before serializing the map. See DeterministicMapOrderGenericDatumWriter for more details.
  • Constructor Details

    • DeterministicMapOrderSpecificDatumWriter

      public DeterministicMapOrderSpecificDatumWriter()
    • DeterministicMapOrderSpecificDatumWriter

      public DeterministicMapOrderSpecificDatumWriter(Class<T> c)
    • DeterministicMapOrderSpecificDatumWriter

      public DeterministicMapOrderSpecificDatumWriter(org.apache.avro.Schema schema)
    • DeterministicMapOrderSpecificDatumWriter

      public DeterministicMapOrderSpecificDatumWriter(org.apache.avro.Schema root, org.apache.avro.specific.SpecificData specificData)
    • DeterministicMapOrderSpecificDatumWriter

      protected DeterministicMapOrderSpecificDatumWriter(org.apache.avro.specific.SpecificData specificData)
  • Method Details

    • getSpecificData

      public org.apache.avro.specific.SpecificData getSpecificData()
      Returns the SpecificData implementation used by this writer.
      Overrides:
      getSpecificData in class org.apache.avro.specific.SpecificDatumWriter<T>
    • internalWrite

      public void internalWrite(org.apache.avro.Schema schema, Object datum, org.apache.avro.io.Encoder out) throws IOException
      Specified by:
      internalWrite in interface DeterministicMapOrderDatumWriter
      Throws:
      IOException
    • writeMap

      protected void writeMap(org.apache.avro.Schema schema, Object datum, org.apache.avro.io.Encoder out) throws IOException
      Overrides:
      writeMap in class org.apache.avro.generic.GenericDatumWriter<T>
      Throws:
      IOException