Class KinesisIO.Write<T>
- All Implemented Interfaces:
Serializable
,HasDisplayData
- Enclosing class:
KinesisIO
KinesisIO.write()
.- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexpand
(PCollection<T> input) Override this method to specify how thisPTransform
should be expanded on the givenInputT
.withBatchMaxBytes
(int bytes) Max.withBatchMaxRecords
(int records) Max.Configuration of Kinesis client.withConcurrentRequests
(int concurrentRequests) Max number of concurrent batch write requests per bundle.withPartitioner
(KinesisPartitioner<T> partitioner) Specify how to partition records among all stream shards (required).withRecordAggregation
(Consumer<KinesisIO.RecordAggregation.Builder> aggregation) Enable record aggregation that is compatible with the KPL / KCL.withRecordAggregation
(KinesisIO.RecordAggregation aggregation) Enable record aggregation that is compatible with the KPL / KCL.Disable KPL / KCL like record aggregation.withSerializer
(SerializableFunction<T, byte[]> serializer) Specify how to serialize records to bytes on the stream (required).withStreamName
(String streamName) Kinesis stream name which will be used for writing (required).Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
-
Constructor Details
-
Write
public Write()
-
-
Method Details
-
withStreamName
Kinesis stream name which will be used for writing (required). -
withBatchMaxRecords
Max. number of records to send per batch write request. -
withBatchMaxBytes
Max. number of bytes to send per batch write request.Single records that exceed this limit are sent individually. Though, be careful to not violate the AWS API limit of 1MB per request.
This includes both partition keys and data.
-
withConcurrentRequests
Max number of concurrent batch write requests per bundle.Note: Concurrency settings above the default have caused a bug in the AWS SDK v2. Therefore, this configuration is currently not exposed to users.
-
withRecordAggregation
Enable record aggregation that is compatible with the KPL / KCL.https://docs.aws.amazon.com/streams/latest/dev/kinesis-kpl-concepts.html#kinesis-kpl-concepts-aggretation
-
withRecordAggregation
public KinesisIO.Write<T> withRecordAggregation(Consumer<KinesisIO.RecordAggregation.Builder> aggregation) Enable record aggregation that is compatible with the KPL / KCL.https://docs.aws.amazon.com/streams/latest/dev/kinesis-kpl-concepts.html#kinesis-kpl-concepts-aggretation
-
withRecordAggregationDisabled
Disable KPL / KCL like record aggregation. -
withPartitioner
Specify how to partition records among all stream shards (required).The partitioner is critical to distribute new records among all stream shards.
-
withSerializer
Specify how to serialize records to bytes on the stream (required). -
withClientConfiguration
Configuration of Kinesis client. -
expand
Description copied from class:PTransform
Override this method to specify how thisPTransform
should be expanded on the givenInputT
.NOTE: This method should not be called directly. Instead apply the
PTransform
should be applied to theInputT
using theapply
method.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:
expand
in classPTransform<PCollection<T>,
KinesisIO.Write.Result>
-