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. SeeDeterministicMapOrderGenericDatumWriter
for more details.
-
-
Field Summary
-
Fields inherited from interface org.apache.avro.generic.DeterministicMapOrderDatumWriter
COMPARATOR
-
-
Constructor Summary
Constructors Modifier Constructor Description DeterministicMapOrderSpecificDatumWriter()
DeterministicMapOrderSpecificDatumWriter(java.lang.Class<T> c)
DeterministicMapOrderSpecificDatumWriter(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.avro.specific.SpecificData
getSpecificData()
Returns theSpecificData
implementation used by this writer.void
internalWrite(org.apache.avro.Schema schema, java.lang.Object datum, org.apache.avro.io.Encoder out)
protected void
writeMap(org.apache.avro.Schema schema, java.lang.Object datum, org.apache.avro.io.Encoder out)
-
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 Detail
-
DeterministicMapOrderSpecificDatumWriter
public DeterministicMapOrderSpecificDatumWriter()
-
DeterministicMapOrderSpecificDatumWriter
public DeterministicMapOrderSpecificDatumWriter(java.lang.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 Detail
-
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, java.lang.Object datum, org.apache.avro.io.Encoder out) throws java.io.IOException
- Specified by:
internalWrite
in interfaceDeterministicMapOrderDatumWriter
- Throws:
java.io.IOException
-
writeMap
protected void writeMap(org.apache.avro.Schema schema, java.lang.Object datum, org.apache.avro.io.Encoder out) throws java.io.IOException
- Overrides:
writeMap
in classorg.apache.avro.generic.GenericDatumWriter<T>
- Throws:
java.io.IOException
-
-