Package org.apache.beam.sdk.io
Class DynamicAvroDestinations<UserT,DestinationT,OutputT>
- java.lang.Object
-
- org.apache.beam.sdk.io.FileBasedSink.DynamicDestinations<UserT,DestinationT,OutputT>
-
- org.apache.beam.sdk.io.DynamicAvroDestinations<UserT,DestinationT,OutputT>
-
- All Implemented Interfaces:
java.io.Serializable
,HasDisplayData
public abstract class DynamicAvroDestinations<UserT,DestinationT,OutputT> extends FileBasedSink.DynamicDestinations<UserT,DestinationT,OutputT>
A specialization ofFileBasedSink.DynamicDestinations
forAvroIO
. In addition to dynamic file destinations, this allows specifying other AVRO properties (schema, metadata, codec, datum writer) per destination.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DynamicAvroDestinations()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description org.apache.avro.file.CodecFactory
getCodec(DestinationT destination)
Return an AVRO codec for a given destination.@Nullable AvroSink.DatumWriterFactory<OutputT>
getDatumWriterFactory(DestinationT destinationT)
Return aAvroSink.DatumWriterFactory
for a given destination.java.util.Map<java.lang.String,java.lang.Object>
getMetadata(DestinationT destination)
Return AVRO file metadata for a given destination.abstract org.apache.avro.Schema
getSchema(DestinationT destination)
Return an AVRO schema for a given destination.-
Methods inherited from class org.apache.beam.sdk.io.FileBasedSink.DynamicDestinations
formatRecord, getDefaultDestination, getDestination, getDestinationCoder, getFilenamePolicy, getSideInputs, populateDisplayData, sideInput
-
-
-
-
Method Detail
-
getSchema
public abstract org.apache.avro.Schema getSchema(DestinationT destination)
Return an AVRO schema for a given destination.
-
getMetadata
public java.util.Map<java.lang.String,java.lang.Object> getMetadata(DestinationT destination)
Return AVRO file metadata for a given destination.
-
getCodec
public org.apache.avro.file.CodecFactory getCodec(DestinationT destination)
Return an AVRO codec for a given destination.
-
getDatumWriterFactory
public @Nullable AvroSink.DatumWriterFactory<OutputT> getDatumWriterFactory(DestinationT destinationT)
Return aAvroSink.DatumWriterFactory
for a given destination. If provided, it will be used to createdDatumWriter
instances as required.
-
-