public abstract class DynamicAvroDestinations<UserT,DestinationT,OutputT> extends FileBasedSink.DynamicDestinations<UserT,DestinationT,OutputT>
FileBasedSink.DynamicDestinations
for AvroIO
. In addition to dynamic file
destinations, this allows specifying other AVRO properties (schema, metadata, codec, datum
writer) per destination.Constructor and Description |
---|
DynamicAvroDestinations() |
Modifier and Type | Method and Description |
---|---|
CodecFactory |
getCodec(DestinationT destination)
Return an AVRO codec for a given destination.
|
AvroSink.DatumWriterFactory<OutputT> |
getDatumWriterFactory(DestinationT destinationT)
Return a
AvroSink.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 Schema |
getSchema(DestinationT destination)
Return an AVRO schema for a given destination.
|
formatRecord, getDefaultDestination, getDestination, getDestinationCoder, getFilenamePolicy, getSideInputs, populateDisplayData, sideInput
public abstract Schema getSchema(DestinationT destination)
public java.util.Map<java.lang.String,java.lang.Object> getMetadata(DestinationT destination)
public CodecFactory getCodec(DestinationT destination)
public AvroSink.DatumWriterFactory<OutputT> getDatumWriterFactory(DestinationT destinationT)
AvroSink.DatumWriterFactory
for a given destination. If provided, it will be
used to created DatumWriter
instances as required.