Class AvroDatumFactory<T>
java.lang.Object
org.apache.beam.sdk.extensions.avro.io.AvroDatumFactory<T>
- All Implemented Interfaces:
Serializable
,AvroSink.DatumWriterFactory<T>
,AvroSource.DatumReaderFactory<T>
- Direct Known Subclasses:
AvroDatumFactory.GenericDatumFactory
,AvroDatumFactory.ReflectDatumFactory
,AvroDatumFactory.SpecificDatumFactory
public abstract class AvroDatumFactory<T>
extends Object
implements AvroSource.DatumReaderFactory<T>, AvroSink.DatumWriterFactory<T>
Create
DatumReader
and DatumWriter
for given schemas.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
SpecializedAvroDatumFactory
forGenericRecord
.static class
SpecializedAvroDatumFactory
for java classes transforming to avro through reflection.static class
SpecializedAvroDatumFactory
forSpecificRecord
. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
static AvroDatumFactory
<GenericRecord> generic()
Returns anAvroDatumFactory
instance for GenericRecord.getType()
Returns the type for the datum factory.int
hashCode()
static <T> AvroDatumFactory
<T> Returns anAvroDatumFactory
instance for the provided element type.static <T> AvroDatumFactory
<T> Returns anAvroDatumFactory
instance for the provided element type respecting Avro's Reflect* or Specific* suite for encoding and decoding.static <T> AvroDatumFactory
<T> Returns anAvroDatumFactory
instance for the provided element type respecting Avro's Reflect* suite for encoding and decoding.static <T> AvroDatumFactory
<T> Returns anAvroDatumFactory
instance for the provided element type respecting Avro's Specific* suite for encoding and decoding.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.beam.sdk.extensions.avro.io.AvroSink.DatumWriterFactory
apply
Methods inherited from interface org.apache.beam.sdk.extensions.avro.io.AvroSource.DatumReaderFactory
apply
-
Field Details
-
type
-
-
Constructor Details
-
AvroDatumFactory
-
-
Method Details
-
generic
Returns anAvroDatumFactory
instance for GenericRecord. -
specific
Returns anAvroDatumFactory
instance for the provided element type respecting Avro's Specific* suite for encoding and decoding. -
reflect
Returns anAvroDatumFactory
instance for the provided element type respecting Avro's Reflect* suite for encoding and decoding. -
of
Returns anAvroDatumFactory
instance for the provided element type. -
of
Returns anAvroDatumFactory
instance for the provided element type respecting Avro's Reflect* or Specific* suite for encoding and decoding. -
getType
Returns the type for the datum factory. -
equals
-
hashCode
public int hashCode()
-