Class AvroIO.Write<T>
- All Implemented Interfaces:
Serializable,HasDisplayData
- Enclosing class:
AvroIO
AvroIO.write(java.lang.Class<T>)
All methods in this class delegate to the appropriate method of AvroIO.TypedWrite. This
class exists for backwards compatibility, and will be removed in Beam 3.0.
- See Also:
-
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints -
Method Summary
Modifier and TypeMethodDescriptionexpand(PCollection<T> input) Override this method to specify how thisPTransformshould be expanded on the givenInputT.voidpopulateDisplayData(DisplayData.Builder builder) Register display data for the given transform or component.to(DynamicAvroDestinations<T, ?, T> dynamicDestinations) Deprecated.to(FileBasedSink.FilenamePolicy filenamePolicy) to(ResourceId outputPrefix) to(ValueProvider<String> outputPrefix) toResource(ValueProvider<ResourceId> outputPrefix) withCodec(CodecFactory codec) withDatumWriterFactory(AvroSink.DatumWriterFactory<T> datumWriterFactory) withMetadata(Map<String, Object> metadata) withNumShards(int numShards) <DestinationT>
AvroIO.TypedWrite<T, DestinationT, T> Specify that output filenames are wanted.withSchema(Schema schema) withShardNameTemplate(String shardTemplate) withSuffix(String filenameSuffix) withSyncInterval(int syncInterval) withTempDirectory(ResourceId tempDirectory) withTempDirectory(ValueProvider<ResourceId> tempDirectory) Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, setDisplayData, setResourceHints, toString, validate, validate
-
Method Details
-
to
-
to
-
to
-
toResource
-
to
-
to
Deprecated.UseFileIO.write()orFileIO.writeDynamic()instead. -
withSyncInterval
-
withSchema
-
withTempDirectory
-
withTempDirectory
-
withShardNameTemplate
-
withSuffix
-
withNumShards
-
withoutSharding
-
withWindowedWrites
-
withCodec
-
withDatumWriterFactory
-
withOutputFilenames
Specify that output filenames are wanted.The nested
AvroIO.TypedWritetransform always has access to output filenames, however due to backwards-compatibility concerns,AvroIO.Writecannot return them. This method simply returns the innerAvroIO.TypedWritetransform which hasWriteFilesResultas its output type, allowing access to output files.The supplied
DestinationTtype must be: the same as that supplied into(DynamicAvroDestinations)if that method was used, orVoidotherwise. -
withMetadata
-
expand
Description copied from class:PTransformOverride this method to specify how thisPTransformshould be expanded on the givenInputT.NOTE: This method should not be called directly. Instead apply the
PTransformshould be applied to theInputTusing theapplymethod.Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
- Specified by:
expandin classPTransform<PCollection<T>,PDone>
-
populateDisplayData
Description copied from class:PTransformRegister display data for the given transform or component.populateDisplayData(DisplayData.Builder)is invoked by Pipeline runners to collect display data viaDisplayData.from(HasDisplayData). Implementations may callsuper.populateDisplayData(builder)in order to register display data in the current namespace, but should otherwise usesubcomponent.populateDisplayData(builder)to use the namespace of the subcomponent.By default, does not register any display data. Implementors may override this method to provide their own display data.
- Specified by:
populateDisplayDatain interfaceHasDisplayData- Overrides:
populateDisplayDatain classPTransform<PCollection<T>,PDone> - Parameters:
builder- The builder to populate with display data.- See Also:
-
FileIO.write()orFileIO.writeDynamic()instead.