public abstract class AbstractAvroWriter<O> extends AvroIO<AbstractAvroWriter> implements AvroWriter<O>
| Constructor and Description |
|---|
AbstractAvroWriter() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getRecordName()
Return the name of this record
|
protected String |
getRecordNameSpace()
Return the namespace of this record
|
protected <C> void |
writeArray(AbstractAvroWriter<C> writer,
Collection<C> list,
org.apache.avro.io.Encoder out)
Write an array of the objects in list
|
protected <K,V> void |
writeMap(AbstractAvroWriter<V> writer,
Map<K,V> map,
com.google.common.base.Function<K,String> keyExtractor,
org.apache.avro.io.Encoder out) |
protected <K> void |
writeMap(Map<K,? extends Number> map,
com.google.common.base.Function<K,String> keyExtractor,
org.apache.avro.io.Encoder out) |
protected <K> void |
writeMap(gnu.trove.map.TObjectDoubleMap<K> map,
com.google.common.base.Function<K,String> keyExtractor,
org.apache.avro.io.Encoder out) |
protected <C> void |
writeOptional(AbstractAvroWriter<C> writer,
com.google.common.base.Optional<C> optional,
org.apache.avro.io.Encoder out)
Write an Optional, this writes a union with null
|
protected void |
writeStringArray(Collection<String> strings,
org.apache.avro.io.Encoder out)
Writes a collection containing strings as an array
|
<C> void |
writeUnion(Class<C> recordSuperclass,
C o,
org.apache.avro.io.Encoder out)
Write a union
|
protected <C> void |
writeUnionArray(Class<C> recordSuperclass,
Collection<C> list,
org.apache.avro.io.Encoder out)
Write an array containing a union
|
createEnumSchema, createRecordFields, createSchema, createSchemaField, createUnionSchema, createUnionSchema, getRecordDoc, getUnion, registerUnion, rewriteNameSpaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwritecreateSchema, getObjectClassprotected String getRecordName()
AvroIOgetRecordName in class AvroIO<AbstractAvroWriter>protected String getRecordNameSpace()
AvroIOgetRecordNameSpace in class AvroIO<AbstractAvroWriter>public <C> void writeUnion(Class<C> recordSuperclass, C o, org.apache.avro.io.Encoder out) throws IOException
C - the class of the object to be writtenrecordSuperclass - the superclass of the uniono - the objectout - the encoderIOExceptionprotected <C> void writeOptional(AbstractAvroWriter<C> writer, com.google.common.base.Optional<C> optional, org.apache.avro.io.Encoder out) throws IOException
C - the class of the object to be writtenwriter - the writer for the object in the Optionaloptional - the Optionalout - the encoderIOExceptionprotected <C> void writeUnionArray(Class<C> recordSuperclass, Collection<C> list, org.apache.avro.io.Encoder out) throws IOException
C - The class of the superclassrecordSuperclass - the superclass of the unionlist - the collection that contains the values that are to be writtenout - the encoderIOExceptionprotected <C> void writeArray(AbstractAvroWriter<C> writer, Collection<C> list, org.apache.avro.io.Encoder out) throws IOException
C - the class of the objects in the collectionwriter - the writer for the objects on the collectionlist - the collection to be writtenout - the encoderIOExceptionprotected void writeStringArray(Collection<String> strings, org.apache.avro.io.Encoder out) throws IOException
strings - the collection of stringsout - the encoderIOExceptionprotected <K,V> void writeMap(AbstractAvroWriter<V> writer, Map<K,V> map, com.google.common.base.Function<K,String> keyExtractor, org.apache.avro.io.Encoder out) throws IOException
IOExceptionprotected <K> void writeMap(gnu.trove.map.TObjectDoubleMap<K> map,
com.google.common.base.Function<K,String> keyExtractor,
org.apache.avro.io.Encoder out)
throws IOException
IOExceptionprotected <K> void writeMap(Map<K,? extends Number> map, com.google.common.base.Function<K,String> keyExtractor, org.apache.avro.io.Encoder out) throws IOException
IOExceptionCopyright © 2016. All Rights Reserved.