Class PollingRecordPublisher
- java.lang.Object
-
- org.apache.flink.streaming.connectors.kinesis.internals.publisher.polling.PollingRecordPublisher
-
- All Implemented Interfaces:
RecordPublisher
- Direct Known Subclasses:
AdaptivePollingRecordPublisher
@Internal public class PollingRecordPublisher extends Object implements RecordPublisher
ARecordPublisherthat will read records from Kinesis and forward them to the subscriber. Records are consumed by polling the GetRecords KDS API using a ShardIterator.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.streaming.connectors.kinesis.internals.publisher.RecordPublisher
RecordPublisher.RecordBatchConsumer, RecordPublisher.RecordPublisherRunResult
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RecordPublisher.RecordPublisherRunResultrun(RecordPublisher.RecordBatchConsumer consumer)Run the record publisher.RecordPublisher.RecordPublisherRunResultrun(RecordPublisher.RecordBatchConsumer consumer, int maxNumberOfRecords)
-
-
-
Method Detail
-
run
public RecordPublisher.RecordPublisherRunResult run(RecordPublisher.RecordBatchConsumer consumer) throws InterruptedException
Description copied from interface:RecordPublisherRun the record publisher. Records will be consumed from the stream and published to the consumer. The number of batches retrieved by a single invocation will vary based on implementation.- Specified by:
runin interfaceRecordPublisher- Parameters:
consumer- the record batch consumer in which to output records- Returns:
- a status enum to represent whether a shard has been fully consumed
- Throws:
InterruptedException
-
run
public RecordPublisher.RecordPublisherRunResult run(RecordPublisher.RecordBatchConsumer consumer, int maxNumberOfRecords) throws InterruptedException
- Throws:
InterruptedException
-
-