Class KinesisIO.Read
java.lang.Object
org.apache.beam.sdk.transforms.PTransform<PBegin,PCollection<KinesisRecord>>
org.apache.beam.sdk.io.aws2.kinesis.KinesisIO.Read
- All Implemented Interfaces:
Serializable,HasDisplayData
- Enclosing class:
KinesisIO
Implementation of
KinesisIO.read().- See Also:
-
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOverride this method to specify how thisPTransformshould be expanded on the givenInputT.Specifies theWatermarkPolicyFactoryas ArrivalTimeWatermarkPolicyFactory.withArrivalTimeWatermarkPolicy(Duration watermarkIdleDurationThreshold) Specifies theWatermarkPolicyFactoryas ArrivalTimeWatermarkPolicyFactory.Configuration of Kinesis invalid input: '&' Cloudwatch clients.withConsumerArn(String consumerArn) Specify consumer ARN to enable Enhanced Fan-Out.withCustomRateLimitPolicy(RateLimitPolicyFactory rateLimitPolicyFactory) Specifies theRateLimitPolicyFactoryfor a custom rate limiter.withCustomWatermarkPolicy(WatermarkPolicyFactory watermarkPolicyFactory) Specifies theWatermarkPolicyFactoryas a custom watermarkPolicyFactory.Specifies a dynamic delay rate limit policy with the given function being called at each polling interval to get the next delay value.Specifies a fixed delay rate limit policy with the default delay of 1 second.Specifies a fixed delay rate limit policy with the given delay.withInitialPositionInStream(software.amazon.kinesis.common.InitialPositionInStream initialPosition) Specify reading from some initial position in stream.withInitialTimestampInStream(Instant initialTimestamp) Specify reading beginning at givenInstant.withMaxCapacityPerShard(Integer maxCapacity) Specifies the maximum number of messages per one shard.withMaxNumRecords(long maxNumRecords) Specifies to read at most a given number of records.withMaxReadTime(Duration maxReadTime) Specifies to read records duringmaxReadTime.Specifies theWatermarkPolicyFactoryas ProcessingTimeWatermarkPolicyFactory.withRequestRecordsLimit(int limit) Specifies the maximum number of records in GetRecordsResult returned by GetRecords call which is limited by 10K records.withStreamName(String streamName) Specify reading from streamName.withUpToDateThreshold(Duration upToDateThreshold) Specifies how late records consumed by this source can be to still be considered on time.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
-
Read
public Read()
-
-
Method Details
-
withStreamName
Specify reading from streamName. -
withConsumerArn
Specify consumer ARN to enable Enhanced Fan-Out. -
withInitialPositionInStream
public KinesisIO.Read withInitialPositionInStream(software.amazon.kinesis.common.InitialPositionInStream initialPosition) Specify reading from some initial position in stream. -
withInitialTimestampInStream
Specify reading beginning at givenInstant. ThisInstantmust be in the past, i.e. beforeInstant.now(). -
withClientConfiguration
Configuration of Kinesis invalid input: '&' Cloudwatch clients. -
withMaxNumRecords
Specifies to read at most a given number of records. -
withMaxReadTime
Specifies to read records duringmaxReadTime. -
withUpToDateThreshold
Specifies how late records consumed by this source can be to still be considered on time. When this limit is exceeded the actual backlog size will be evaluated and the runner might decide to scale the amount of resources allocated to the pipeline in order to speed up ingestion. -
withRequestRecordsLimit
Specifies the maximum number of records in GetRecordsResult returned by GetRecords call which is limited by 10K records. If should be adjusted according to average size of data record to prevent shard overloading. More details can be found here: API_GetRecords -
withArrivalTimeWatermarkPolicy
Specifies theWatermarkPolicyFactoryas ArrivalTimeWatermarkPolicyFactory. -
withArrivalTimeWatermarkPolicy
Specifies theWatermarkPolicyFactoryas ArrivalTimeWatermarkPolicyFactory.Denotes the duration for which the watermark can be idle.
-
withProcessingTimeWatermarkPolicy
Specifies theWatermarkPolicyFactoryas ProcessingTimeWatermarkPolicyFactory. -
withCustomWatermarkPolicy
Specifies theWatermarkPolicyFactoryas a custom watermarkPolicyFactory.- Parameters:
watermarkPolicyFactory- Custom Watermark policy factory.
-
withFixedDelayRateLimitPolicy
Specifies a fixed delay rate limit policy with the default delay of 1 second. -
withFixedDelayRateLimitPolicy
Specifies a fixed delay rate limit policy with the given delay.- Parameters:
delay- Denotes the fixed delay duration.
-
withDynamicDelayRateLimitPolicy
Specifies a dynamic delay rate limit policy with the given function being called at each polling interval to get the next delay value. This can be used to change the polling interval of a running pipeline based on some external configuration source, for example.- Parameters:
delay- The function to invoke to get the next delay duration.
-
withCustomRateLimitPolicy
Specifies theRateLimitPolicyFactoryfor a custom rate limiter.- Parameters:
rateLimitPolicyFactory- Custom rate limit policy factory.
-
withMaxCapacityPerShard
Specifies the maximum number of messages per one shard.Note: When using consumers with dedicated throughput (Enhanced Fan-Out), this capacity corresponds to the number of in-flight shard events which itself can contain multiple, potentially even aggregated records.
- See Also:
-
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<PBegin,PCollection<KinesisRecord>>
-