Package org.apache.avro.specific
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.-
Field Summary
Fields inherited from interface org.apache.avro.generic.DeterministicMapOrderDatumWriter
COMPARATOR
-
Constructor Summary
ModifierConstructorDescriptionDeterministicMapOrderSpecificDatumWriter
(org.apache.avro.Schema schema) DeterministicMapOrderSpecificDatumWriter
(org.apache.avro.Schema root, org.apache.avro.specific.SpecificData specificData) protected
DeterministicMapOrderSpecificDatumWriter
(org.apache.avro.specific.SpecificData specificData) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.avro.specific.SpecificData
Returns theSpecificData
implementation used by this writer.void
internalWrite
(org.apache.avro.Schema schema, Object datum, org.apache.avro.io.Encoder out) protected void
Methods inherited from class org.apache.avro.specific.SpecificDatumWriter
writeEnum, writeField, writeRecord, writeString
Methods inherited from class org.apache.avro.generic.GenericDatumWriter
addAvroTypeMsg, addClassCastMsg, convert, getArrayElements, getArraySize, getData, getMapEntries, getMapSize, npe, resolveUnion, setSchema, write, write, writeArray, writeBytes, writeFixed, writeString, writeWithoutConversion
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.avro.generic.DeterministicMapOrderDatumWriter
writeMapWithDeterministicOrder
-
Constructor Details
-
DeterministicMapOrderSpecificDatumWriter
public DeterministicMapOrderSpecificDatumWriter() -
DeterministicMapOrderSpecificDatumWriter
-
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 theSpecificData
implementation used by this writer.- Overrides:
getSpecificData
in classorg.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 interfaceDeterministicMapOrderDatumWriter
- Throws:
IOException
-
writeMap
protected void writeMap(org.apache.avro.Schema schema, Object datum, org.apache.avro.io.Encoder out) throws IOException - Overrides:
writeMap
in classorg.apache.avro.generic.GenericDatumWriter<T>
- Throws:
IOException
-