public abstract static class KinesisIO.Read extends PTransform<PBegin,PCollection<KinesisRecord>>
KinesisIO.read()
.name
Constructor and Description |
---|
Read() |
Modifier and Type | Method and Description |
---|---|
PCollection<KinesisRecord> |
expand(PBegin input)
Override this method to specify how this
PTransform should be expanded
on the given InputT . |
KinesisIO.Read |
from(java.lang.String streamName,
com.amazonaws.services.kinesis.clientlibrary.lib.worker.InitialPositionInStream initialPosition)
Specify reading from streamName at some initial position.
|
KinesisIO.Read |
from(java.lang.String streamName,
Instant initialTimestamp)
Specify reading from streamName beginning at given
Instant . |
KinesisIO.Read |
withClientProvider(org.apache.beam.sdk.io.kinesis.KinesisClientProvider kinesisClientProvider)
Allows to specify custom
KinesisClientProvider . |
KinesisIO.Read |
withClientProvider(java.lang.String awsAccessKey,
java.lang.String awsSecretKey,
com.amazonaws.regions.Regions region)
Specify credential details and region to be used to read from Kinesis.
|
KinesisIO.Read |
withMaxNumRecords(int maxNumRecords)
Specifies to read at most a given number of records.
|
KinesisIO.Read |
withMaxReadTime(Duration maxReadTime)
Specifies to read at most a given number of records.
|
getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, populateDisplayData, toString, validate
public KinesisIO.Read from(java.lang.String streamName, com.amazonaws.services.kinesis.clientlibrary.lib.worker.InitialPositionInStream initialPosition)
public KinesisIO.Read from(java.lang.String streamName, Instant initialTimestamp)
Instant
.
This Instant
must be in the past, i.e. before Instant.now()
.public KinesisIO.Read withClientProvider(org.apache.beam.sdk.io.kinesis.KinesisClientProvider kinesisClientProvider)
KinesisClientProvider
.
KinesisClientProvider
provides AmazonKinesis
instances which are later
used for communication with Kinesis.
You should use this method if withClientProvider(String, String, Regions)
does not suit your needs.public KinesisIO.Read withClientProvider(java.lang.String awsAccessKey, java.lang.String awsSecretKey, com.amazonaws.regions.Regions region)
withClientProvider(KinesisClientProvider)
.public KinesisIO.Read withMaxNumRecords(int maxNumRecords)
public KinesisIO.Read withMaxReadTime(Duration maxReadTime)
public PCollection<KinesisRecord> expand(PBegin input)
PTransform
PTransform
should be expanded
on the given InputT
.
NOTE: This method should not be called directly. Instead apply the
PTransform
should be applied to the InputT
using the apply
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).
expand
in class PTransform<PBegin,PCollection<KinesisRecord>>