public static class AvroIO.Write<T>
extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<T>,org.apache.beam.sdk.values.PDone>
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.
| Modifier and Type | Method and Description |
|---|---|
org.apache.beam.sdk.values.PDone |
expand(org.apache.beam.sdk.values.PCollection<T> input) |
void |
populateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder builder) |
AvroIO.Write<T> |
to(DynamicAvroDestinations<T,?,T> dynamicDestinations)
Deprecated.
Use
FileIO.write() or FileIO.writeDynamic() instead. |
AvroIO.Write<T> |
to(org.apache.beam.sdk.io.FileBasedSink.FilenamePolicy filenamePolicy)
See
TypedWrite#to(FilenamePolicy). |
AvroIO.Write<T> |
to(org.apache.beam.sdk.io.fs.ResourceId outputPrefix)
|
AvroIO.Write<T> |
to(java.lang.String outputPrefix)
|
AvroIO.Write<T> |
to(org.apache.beam.sdk.options.ValueProvider<java.lang.String> outputPrefix)
|
AvroIO.Write<T> |
toResource(org.apache.beam.sdk.options.ValueProvider<org.apache.beam.sdk.io.fs.ResourceId> outputPrefix)
|
AvroIO.Write<T> |
withCodec(org.apache.avro.file.CodecFactory codec)
|
AvroIO.Write<T> |
withDatumWriterFactory(AvroSink.DatumWriterFactory<T> datumWriterFactory)
|
AvroIO.Write<T> |
withMetadata(java.util.Map<java.lang.String,java.lang.Object> metadata)
|
AvroIO.Write<T> |
withNumShards(int numShards)
|
<DestinationT> |
withOutputFilenames()
Specify that output filenames are wanted.
|
AvroIO.Write<T> |
withoutSharding()
|
AvroIO.Write<T> |
withSchema(org.apache.avro.Schema schema)
|
AvroIO.Write<T> |
withShardNameTemplate(java.lang.String shardTemplate)
|
AvroIO.Write<T> |
withSuffix(java.lang.String filenameSuffix)
|
AvroIO.Write<T> |
withSyncInterval(int syncInterval)
|
AvroIO.Write<T> |
withTempDirectory(org.apache.beam.sdk.io.fs.ResourceId tempDirectory)
|
AvroIO.Write<T> |
withTempDirectory(org.apache.beam.sdk.options.ValueProvider<org.apache.beam.sdk.io.fs.ResourceId> tempDirectory)
|
AvroIO.Write<T> |
withWindowedWrites()
|
public AvroIO.Write<T> to(java.lang.String outputPrefix)
@Experimental(value=FILESYSTEM) public AvroIO.Write<T> to(org.apache.beam.sdk.io.fs.ResourceId outputPrefix)
public AvroIO.Write<T> to(org.apache.beam.sdk.options.ValueProvider<java.lang.String> outputPrefix)
@Experimental(value=FILESYSTEM) public AvroIO.Write<T> toResource(org.apache.beam.sdk.options.ValueProvider<org.apache.beam.sdk.io.fs.ResourceId> outputPrefix)
public AvroIO.Write<T> to(org.apache.beam.sdk.io.FileBasedSink.FilenamePolicy filenamePolicy)
TypedWrite#to(FilenamePolicy).@Deprecated public AvroIO.Write<T> to(DynamicAvroDestinations<T,?,T> dynamicDestinations)
FileIO.write() or FileIO.writeDynamic() instead.public AvroIO.Write<T> withSyncInterval(int syncInterval)
public AvroIO.Write<T> withSchema(org.apache.avro.Schema schema)
@Experimental(value=FILESYSTEM) public AvroIO.Write<T> withTempDirectory(org.apache.beam.sdk.options.ValueProvider<org.apache.beam.sdk.io.fs.ResourceId> tempDirectory)
public AvroIO.Write<T> withTempDirectory(org.apache.beam.sdk.io.fs.ResourceId tempDirectory)
public AvroIO.Write<T> withShardNameTemplate(java.lang.String shardTemplate)
public AvroIO.Write<T> withSuffix(java.lang.String filenameSuffix)
public AvroIO.Write<T> withNumShards(int numShards)
public AvroIO.Write<T> withoutSharding()
public AvroIO.Write<T> withWindowedWrites()
public AvroIO.Write<T> withCodec(org.apache.avro.file.CodecFactory codec)
public AvroIO.Write<T> withDatumWriterFactory(AvroSink.DatumWriterFactory<T> datumWriterFactory)
public <DestinationT> AvroIO.TypedWrite<T,DestinationT,T> withOutputFilenames()
The nested AvroIO.TypedWritetransform always has access to output filenames, however due
to backwards-compatibility concerns, AvroIO.Write cannot return them. This method simply
returns the inner AvroIO.TypedWrite transform which has WriteFilesResult as its
output type, allowing access to output files.
The supplied DestinationT type must be: the same as that supplied in to(DynamicAvroDestinations) if that method was used, or Void otherwise.
public AvroIO.Write<T> withMetadata(java.util.Map<java.lang.String,java.lang.Object> metadata)
public org.apache.beam.sdk.values.PDone expand(org.apache.beam.sdk.values.PCollection<T> input)
expand in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<T>,org.apache.beam.sdk.values.PDone>public void populateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder builder)
populateDisplayData in interface org.apache.beam.sdk.transforms.display.HasDisplayDatapopulateDisplayData in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<T>,org.apache.beam.sdk.values.PDone>