Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing timeouts for get-records calls. #214

Merged
merged 14 commits into from
Sep 18, 2017

Conversation

sahilpalvia
Copy link
Contributor

Call out to contributions made by @pfifer and @BtXin.

Sahil Palvia and others added 14 commits August 30, 2017 15:05
Addressing CR comments. Adding new constructor, returning from an interrupted exception and creating a shutdown method.

Removing unnecessary method
* Renamed the retrieval strategy classes to fix a spelling error.
* Modified the strategy interface to support shutdown, and determination
  of whether a strategy has been shutdown.
* Moved the existing tests for the async strategy to an integration
  test.
* Modified the async strategy to allow injection of more state
  components
* Modified the async strategy to throw an exception if an attempt is
  made to use it after shutdown.

cr https://code.amazon.com/reviews/CR-590341
…inesisClientGithubMirror into getrecords-retry

Changed ConsumerStateTest and ProcessTask due to the constructor change
…inesisClientGithubMirror into getrecords-retry
Setup the metrics scope to a cross thread version, and install the
thread local.  This gets rid of a warning for the calls to dataFetcher.

cr https://code.amazon.com/reviews/CR-638954
@sahilpalvia sahilpalvia merged commit f3dbdc3 into awslabs:master Sep 18, 2017
@sahilpalvia sahilpalvia deleted the getrecords-retry branch September 18, 2017 17:53
pfifer pushed a commit that referenced this pull request Sep 18, 2017
This feature was added with the support of Call out to contributions
made by @pfifer, @sahilpalvia, and @BtXin.
pfifer pushed a commit that referenced this pull request Sep 18, 2017
It's now possible to configure GetRecords calls to timeout if they
take to long.  This can be used to terminate a long running request to
ensure that record processors continue to make progress

This feature was added with contributions from @pfifer, @sahilpalvia,
and @BtXin.
@sahilpalvia sahilpalvia restored the getrecords-retry branch September 18, 2017 18:05
@pfifer pfifer added this to the Release 1.8.2 milestone Sep 19, 2017
pfifer added a commit to pfifer/amazon-kinesis-client that referenced this pull request Sep 20, 2017
* Add support for two phase checkpoints
  Applications can now set a pending checkpoint, before completing the checkpoint operation. Once the application has completed its checkpoint steps, the final checkpoint will clear the pending checkpoint.
  Should the checkpoint fail the attempted sequence number is provided in the InitializationInput#getPendingCheckpointSequenceNumber otherwise the value will be null.
  * PR awslabs#188
* Support timeouts, and retry for GetRecords calls.
  Applications can now set timeouts for GetRecord calls to Kinesis.  As part of setting the timeout, the application must also provide a thread pool size for concurrent requests.
  * PR awslabs#214
* Notification when the lease table is throttled
  When writes, or reads, to the lease table are throttled a warning will be emitted.  If you're seeing this warning you should increase the IOPs for your lease table to prevent processing delays.
  * PR awslabs#212
* Support configuring the graceful shutdown timeout for MultiLang Clients
  This adds support for setting the timeout that the Java process will wait for the MutliLang client to complete graceful shutdown.  The timeout can be configured by adding `shutdownGraceMillis` to the properties file set to the number of milliseconds to wait.
  * PR awslabs#204
pfifer added a commit that referenced this pull request Sep 20, 2017
* Add support for two phase checkpoints
  Applications can now set a pending checkpoint, before completing the checkpoint operation. Once the application has completed its checkpoint steps, the final checkpoint will clear the pending checkpoint.
  Should the checkpoint fail the attempted sequence number is provided in the InitializationInput#getPendingCheckpointSequenceNumber otherwise the value will be null.
  * PR #188
* Support timeouts, and retry for GetRecords calls.
  Applications can now set timeouts for GetRecord calls to Kinesis.  As part of setting the timeout, the application must also provide a thread pool size for concurrent requests.
  * PR #214
* Notification when the lease table is throttled
  When writes, or reads, to the lease table are throttled a warning will be emitted.  If you're seeing this warning you should increase the IOPs for your lease table to prevent processing delays.
  * PR #212
* Support configuring the graceful shutdown timeout for MultiLang Clients
  This adds support for setting the timeout that the Java process will wait for the MutliLang client to complete graceful shutdown.  The timeout can be configured by adding shutdownGraceMillis to the properties file set to the number of milliseconds to wait.
  * PR #204
sahilpalvia pushed a commit that referenced this pull request Sep 21, 2017
* MultiLangDaemon: Make shutdown grace configurable (#204)

Allow configuring the amount of time that the graceful shutdown process will wait for the client to complete its shutdown.

* Release 1.8.2 of the Amazon Kinesis Client for Java (#218)

* Add support for two phase checkpoints
  Applications can now set a pending checkpoint, before completing the checkpoint operation. Once the application has completed its checkpoint steps, the final checkpoint will clear the pending checkpoint.
  Should the checkpoint fail the attempted sequence number is provided in the InitializationInput#getPendingCheckpointSequenceNumber otherwise the value will be null.
  * PR #188
* Support timeouts, and retry for GetRecords calls.
  Applications can now set timeouts for GetRecord calls to Kinesis.  As part of setting the timeout, the application must also provide a thread pool size for concurrent requests.
  * PR #214
* Notification when the lease table is throttled
  When writes, or reads, to the lease table are throttled a warning will be emitted.  If you're seeing this warning you should increase the IOPs for your lease table to prevent processing delays.
  * PR #212
* Support configuring the graceful shutdown timeout for MultiLang Clients
  This adds support for setting the timeout that the Java process will wait for the MutliLang client to complete graceful shutdown.  The timeout can be configured by adding shutdownGraceMillis to the properties file set to the number of milliseconds to wait.
  * PR #204
sahilpalvia added a commit that referenced this pull request Sep 22, 2017
* MultiLangDaemon: Make shutdown grace configurable (#204)

Allow configuring the amount of time that the graceful shutdown process will wait for the client to complete its shutdown.

* Release 1.8.2 of the Amazon Kinesis Client for Java (#218)

* Add support for two phase checkpoints
  Applications can now set a pending checkpoint, before completing the checkpoint operation. Once the application has completed its checkpoint steps, the final checkpoint will clear the pending checkpoint.
  Should the checkpoint fail the attempted sequence number is provided in the InitializationInput#getPendingCheckpointSequenceNumber otherwise the value will be null.
  * PR #188
* Support timeouts, and retry for GetRecords calls.
  Applications can now set timeouts for GetRecord calls to Kinesis.  As part of setting the timeout, the application must also provide a thread pool size for concurrent requests.
  * PR #214
* Notification when the lease table is throttled
  When writes, or reads, to the lease table are throttled a warning will be emitted.  If you're seeing this warning you should increase the IOPs for your lease table to prevent processing delays.
  * PR #212
* Support configuring the graceful shutdown timeout for MultiLang Clients
  This adds support for setting the timeout that the Java process will wait for the MutliLang client to complete graceful shutdown.  The timeout can be configured by adding shutdownGraceMillis to the properties file set to the number of milliseconds to wait.
  * PR #204

* Calling shutdown on the RetrievalStrategy (#222)

Fixes a bug where the retriever wasn't being shutdown when a record processor was being shutdown.

* Release 1.8.3 of the Amazon Kinesis Client for Java (#224)

* Call shutdown on the retriever when the record processor is being shutdown
  This fixes a bug that could leak threads if using the
  AsynchronousGetRecordsRetrievalStrategy is being used.
  The asynchronous retriever is only used when
  KinesisClientLibConfiguration#retryGetRecordsInSeconds, and
  KinesisClientLibConfiguration#maxGetRecordsThreadPool are set.
  * PR #222
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants