Commit graph

238 commits

Author SHA1 Message Date
Justin Pfifer
af51312307 Release 1.8.0 (#193)
* Execute graceful shutdown on its own thread
  * PR #191
  * Issue #167
* Added support for controlling the size of the lease renewer thread pool
  * PR #177
  * Issue #171
* Require Java 8 and later
  Java 8 is now required for versions 1.8.0 of the amazon-kinesis-client and later.
  * PR #176
2017-07-25 09:22:48 -07:00
Justin Pfifer
c067cefa1f Make Graceful Shutdown Run On Its Own Thread (#191)
* Initial start of fix for requested shutdown

* Execute the requested shutdown in a separate thread.

Fix for Issue #167

* Reworked some of the shutdown logic to make the relationships clearer.

* Added/Updated Copyright Statements

* Add Missing License Statements
2017-07-21 08:30:26 -07:00
Justin Pfifer
f697a094d9 Make the lease renewer thread pool size configurable (#177)
Allow configuration of the lease renewer thread pool size.  Users can
now control the size of the pool.  Additionally core threads are now
a quarter of the thread pool size, and aren't allowed to timeout.
2017-07-20 12:07:21 -07:00
Justin Pfifer
14e2413c13 Advance version, and drop Java 7 support (#176)
* Advance version, and drop Java 7 support

Advanced the version to 1.8.0 as Java 7 support is being removed.

* Remove build settings for Java 7

Removed the configuration for Java 7, and switched to trusty for access
to openjdk8.
2017-07-20 12:03:34 -07:00
Justin Pfifer
4c839a9d43 Release 1.7.6 of the Amazon Kinesis Client (#184)
* Added support for graceful shutdown in MultiLang Clients
  * PR #174
  * PR #182
* Updated documentation for `v2.IRecordProcessor#shutdown`, and `KinesisClientLibConfiguration#idleTimeBetweenReadsMillis`
  * PR #170
* Updated to version 1.11.151 of the AWS Java SDK
  * PR #183
2017-06-22 06:56:42 -07:00
Justin Pfifer
dabdc29822 Update to the Newest Version of the AWS Java SDK (#183) 2017-06-21 08:54:18 -07:00
Justin Pfifer
d7ed56d4d0 Added ShutdownRequestedMessage to the subtypes for Message (#182)
Added the ShutdownRequestedMessage to the subtypes for Message.  This ensures that the action value of the message will be correctly set.
2017-06-21 08:36:41 -07:00
Muhammad Ikramul Haq
5a8bac23c6 Trigger Graceful Shutdown for MultiLang Daemon Clients on SIGTERM (#174)
When the parent Java process receives a SIGTERM it will now trigger a graceful shutdown of the worker, which dispatches a ShutdownRequestedMessage to all of the record processors.  This will allow record processors a final chance to checkpoint before the lease is terminated.

This changes is incompatible with current versions of the MultiLang Clients.  A future change will allow older versions MultiLang clients to use newer versions of the Java KCL.
2017-06-21 07:52:30 -07:00
Pfifer, Justin
198f8afce7 Advance Version to 1.7.6 for Next Release 2017-06-21 07:46:06 -07:00
Pfifer, Justin
e121691ac2 Cleanup the Writing of the IdleTimeBetweenMillis Documentation 2017-06-01 08:26:16 -07:00
Pfifer, Justin
e12ff541f7 Enable Building Both Source, and JavaDoc jars 2017-06-01 08:26:16 -07:00
Pfifer, Justin
ddfd64e40a Update the Documentation for Shutdown to List Checkpoint Requirements
When the KCL calls shutdown with the reason TERMINATE the customer's
application must checkpoint, or the KCL will not make progress.
2017-06-01 08:26:16 -07:00
Pfifer, Justin
f0557179f1 Improved Documentation for IdleTimeBetweenReadsMillis
Updated the documentation to indicates that it is only used when
GetRecords returns an empty set of records.
2017-06-01 08:26:16 -07:00
Pfifer, Justin
8d339bdb88 Release 1.7.5 of the Amazon Kinesis Client Library
* Correctly handle throttling for DescribeStream, and save accumulated progress from individual calls.
  * PR #152
* Upgrade to version 1.11.115 of the AWS Java SDK
  * PR #155
2017-04-07 10:39:44 -07:00
Pfifer, Justin
81f3283f02 Added PR for Latest Version of SDK
Added the link to the PR for the latest version of the AWS Java SDK.
2017-04-07 10:08:02 -07:00
Pfifer, Justin
22773b2a44 Initial Release Notes for Release 1.7.5
Added the initial release notes for 1.7.5, but will update the AWS SDK
before finalizing them.
2017-04-07 10:08:02 -07:00
Pfifer, Justin
105c4f2a6b Upgrade to Version 1.11.115 of the AWS Java SDK
Upgraded to the current version.
2017-04-07 09:41:52 -07:00
Pfifer, Justin
97a29fc918 Update to a Newer Version of DynamoDB Local
Updated to a newer version of the DynamoDB Local library, and updated
the repository location.
2017-03-28 07:49:43 -07:00
Pfifer, Justin
fb4270e98b Change Shard Iterator State Reset to Recreation
Changed the shard iterator reset to simply recreate the iterator.
2017-03-28 07:49:43 -07:00
Pfifer, Justin
e45f59c73b Better Handling of Describe Stream Throttling
Improve the handling of describe stream throttling by no longer
triggering a null pointer exception when all requests are throttled.
Also store the last position reached, and always restart from
there.
2017-03-28 07:49:43 -07:00
Pfifer, Justin
92e8c28995 Advance Version to 1.7.5-SNAPSHOT
Advance the package version in preparation for development.
2017-03-20 10:05:13 -07:00
Pfifer, Justin
0a91e6faa5 Release 1.7.4 of the Amazon Kinesis Client
* Fixed an issue building JavaDoc for Java 8.
  * [Issue #18](https://github.com/awslabs/amazon-kinesis-client/issues/18)
  * [PR #141](https://github.com/awslabs/amazon-kinesis-client/pull/141)
* Reduce Throttling Messages to WARN, unless throttling occurs 6 times consecutively.
  * [Issue #4](https://github.com/awslabs/amazon-kinesis-client/issues/4)
  * [PR #140](https://github.com/awslabs/amazon-kinesis-client/pull/140)
* Fixed two bugs occurring in requestShutdown.
  * Fixed a bug that prevented the worker from shutting down, via requestShutdown, when no leases were held.
    * [Issue #128](https://github.com/awslabs/amazon-kinesis-client/issues/128)
  * Fixed a bug that could trigger a NullPointerException if leases changed during requestShutdown.
    * [Issue #129](https://github.com/awslabs/amazon-kinesis-client/issues/129)
  * [PR #139](https://github.com/awslabs/amazon-kinesis-client/pull/139)
* Upgraded the AWS SDK Version to 1.11.91
  * [PR #138](https://github.com/awslabs/amazon-kinesis-client/pull/138)
* Use an executor returned from `ExecutorService.newFixedThreadPool` instead of constructing it by hand.
  * [PR #135](https://github.com/awslabs/amazon-kinesis-client/pull/135)
* Correctly initialize DynamoDB client, when endpoint is explicitly set.
  * [PR #142](https://github.com/awslabs/amazon-kinesis-client/pull/142)
2017-02-27 08:12:17 -08:00
Christopher Chambers
4ed375b0af Add missing init for DynamoDB client in Worker (#51)
When the dynamoDBEndpoint configuration property was added, not all paths that
should have made use of it were updated.  Both paths now use the config value to
set up the DynamoDB client.
2017-02-27 07:47:15 -08:00
Sahn Lam
9113ae2e72 Use ExecutorService.newFixedThreadPool for LeaseRenewer
The existing ThreadPoolExecutor was misconfigured and caused
the thread pool to recycle idle threads continuously. VisualVM
showed that a thread got recycled about every 3 seconds, creating
and destroying several hundred threads in about 15 minutes.

Use ExecutorService.newFixedThreadPool instead, as recommended
by the javadoc for ExecutorService.
2017-02-24 05:57:59 -08:00
Justin Pfifer
030ae1cb15 Disable doclint When Building With Java 8 (#141)
Disable the JavaDoc doclint when building with Java 8.  Java 8 became
much more pedantic on bad practices, and the documentation hasn't been
cleaned up.
2017-02-17 10:32:21 -08:00
Justin Pfifer
2967f2a18c Reduce Throttling Error Reports (#140)
* Reduce Throttling Error Reports

Only report a throttling error if their are 6 consecutive throttles.
Moved the logging of throttling messages to the throttling
reporter.
2017-02-17 09:52:47 -08:00
Justin Pfifer
31615a5d18 Handle No Lease, and Lease Loss in requestShutdown. (#139)
* Handle No Lease, and Lease Loss in requestShutdown.

Ensure that the Worker is shutdown if there are no leases.  Handle the
case where a lease is lost during the notification process.

* Add some more comments around possible race conditions.
2017-02-17 09:32:26 -08:00
Justin Pfifer
bf7152475a Use the Current Version of the AWS Java SDK (#138)
Updated to the 1.11.91 version of the AWS Java SDK.
2017-02-17 09:19:31 -08:00
Pfifer, Justin
037e886a76 Advance Version to 1.7.4-SNAPSHOT
Advance the version to 1.7.4-SNAPSHOT in preparation of the next release.
2017-02-17 09:09:02 -08:00
Justin Pfifer
3d18e484cf Release 1.7.3 of the Amazon Kinesis Client (#131)
* Upgrade to the newest AWS Java SDK.
  * Issue awslabs/amazon-kinesis-client-python#27
  * PR #126
  * PR #125
* Added a direct dependency on commons-logging.
  * Issue #123
  * PR #124
* Make ShardInfo public to allow for custom ShardPrioritization strategies.
  * Issue #120
  * PR #127
2017-01-20 09:05:54 -08:00
Jim Slattery
d8276e60cd Update README: fix 'MultiLangDaemon' typo (#130) 2017-01-20 08:47:09 -08:00
Justin Pfifer
a7b16b49d9 Make ShardInfo Public, and Update Documentation (#127)
Made the ShardInfo class public, and updated the documentation for a
number of the properties.

This will allow users to implement custom shard prioritization
strategies.

Fixes:
Issue #120
2017-01-09 08:11:01 -08:00
Justin Pfifer
b607df3823 Update to newest AWS Java SDK (#126)
Updated to the newest version of the AWS Java SDK.

Fixes:
Amazon Kinesis Client for Python Issue awslabs/amazon-kinesis-client-python#27

Related:
PR #125
2017-01-09 08:10:38 -08:00
Justin Pfifer
7acd0fb6d2 Add Direct Dependency on Commons Log (#124)
* Add Direct Dependency on Commons Log

Commons log was a transient dependency, but should have been a direct
dependency.  Now take a direct dependency on it.

* Move to Next Release Version Snapshot

Changed version to 1.7.3-SNAPSHOT for next release.
2017-01-03 14:50:29 -08:00
Pfifer, Justin
0954ed8b26 Release 1.7.2 of the Amazon Kinesis Client Library
MultiLangDaemon Feature Updates

The MultiLangDaemon has been upgraded to use the v2 interfaces, which allows access to enhanced checkpointing, and more information during record processor initialization. The MultiLangDaemon clients must be updated before they can take advantage of these new features.
2016-11-07 11:50:06 -08:00
Justin Pfifer
5d045521ce Update MultiLangDaemon to Support New Features (#118)
Updated the MultiLangDaemon to use the v2 record processor interfaces, and added features to messages passed to MultiLangDaemon clients.

These changes will require updates to the various MultiLangDaemon clients. The changes for the Python version are complete, and other versions will be updated later.
2016-11-07 11:38:04 -08:00
Pfifer, Justin
ed7d069e50 Move Version to 1.7.2-SNAPSHOT for Development
Move to the next expected release version for upcoming development.
2016-11-04 08:42:33 -07:00
Justin Pfifer
929abea107 Release 1.7.1 of the Amazon Kinesis Client Library (#116)
* General
  * Allow disabling shard synchronization at startup.
    * Applications can disable shard synchronization at startup.  Disabling shard synchronization can application startup times for very large streams.
    * [PR #102](https://github.com/awslabs/amazon-kinesis-client/pull/102)
  * Applications can now request a graceful shutdown, and record processors that implement the IShutdownNotificationAware will be given a chance to checkpoint before being shutdown.
    * This adds a [new interface](https://github.com/awslabs/amazon-kinesis-client/blob/master/src/main/java/com/amazonaws/services/kinesis/clientlibrary/interfaces/v2/IShutdownNotificationAware.java), and a [new method on Worker](https://github.com/awslabs/amazon-kinesis-client/blob/master/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/Worker.java#L539).
    * [PR #109](https://github.com/awslabs/amazon-kinesis-client/pull/109)
    * Solves [Issue #79](https://github.com/awslabs/amazon-kinesis-client/issues/79)
* MultiLangDaemon
  * Applications can now use credential provides that accept string parameters.
    * [PR #99](https://github.com/awslabs/amazon-kinesis-client/pull/99)
  * Applications can now use different credentials for each service.
    * [PR #111](https://github.com/awslabs/amazon-kinesis-client/pull/111)
2016-11-03 09:46:11 -07:00
Justin Pfifer
26e67a33b1 Allow for a Graceful Shutdown of the Worker (#109)
Add a new method to the worker requestShutdown that allows the worker to
gracefully shutdown all record processors.  The graceful shutdown gives
the record processors a last chance to checkpoint before they're
terminated.

To use these new features the record processor must implement
IShutdownnotificationaware.
2016-10-26 12:57:50 -07:00
Josh
db314b970b Allow for credential providers with basic arg types (#99)
* Add support for configuring DynamoDB endpoint

Adding a new field named `dynamoDBEndpoint` to the .properties file
that gets passed into the KCL multi-lang daemon. We need this ability
to point the KCL worker at a local instance of DynamoDB rather than in
AWS.

* Added the ability to use AWSCredentialsProvider's that require non-empty contructor args e.g. ProfileCredentialsProvider where you provide the profile name to use from your ~/.aws/credentials file

* Created a constructor without the dynamoDBEndpoint argument i.e. same arguments before the dynamo change, for backwards compatibility
2016-10-14 10:05:44 -07:00
Justin Pfifer
56c59f685a Allow Disabling Shard Sync at Startup (#102)
Allow disabling the shard sync at startup if the lease table already
contains leases.  This will reduce the startup load for larger streams
when restarted the Kinesis application.
2016-10-14 08:11:32 -07:00
Randy Findley
5c497d87a9 Feature/multiple cred providers (#111)
* Add ability to specify different credential providers for Kinesis, DynamoDB, and CloudWatch.  This is needed when accessing a cross-account Kineses stream using an assumed role.

* Fix copy/paste mistake.

* Update tests.

Thanks to rgfindl@
2016-10-14 08:10:38 -07:00
Pfifer, Justin
51663f96c7 Move Version to Next Development Version
Adjusted the version to 1.7.1-SNAPSHOT for current development.
2016-09-01 07:36:20 -07:00
Pfifer, Justin
8a32e89fe9 Version 1.7.0 of the Amazon Kinesis Client Library
* Add support for time based iterators ([See GetShardIterator Documentation](http://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html))
  * [PR #94](https://github.com/awslabs/amazon-kinesis-client/pull/94)
  The `KinesisClientLibConfiguration` now supports providing an initial time stamp position.
  * This position is only used if there is no current checkpoint for the shard.
  * This setting cannot be used with DynamoDB Streams
  Resolves [Issue #88](https://github.com/awslabs/amazon-kinesis-client/issues/88)
* Allow Prioritization of Parent Shards for Task Assignment
  * [PR #95](https://github.com/awslabs/amazon-kinesis-client/pull/95)
  The `KinesisClientLibconfiguration` now supports providing a `ShardPrioritization` strategy.  This strategy controls how the `Worker` determines which `ShardConsumer` to call next.  This can improve processing for streams that split often, such as DynamoDB Streams.
* Remove direct dependency on `aws-java-sdk-core`, to allow independent versioning.
  * [PR #92](https://github.com/awslabs/amazon-kinesis-client/pull/92)
  **You may need to add a direct dependency on aws-java-sdk-core if other dependencies include an older version.**
2016-08-22 12:55:19 -07:00
Justin Pfifer
1d0ce08667 Merge pull request #98 from pfifer/tbsi-logging-issue
Prevent Spurious Info Message on getIterator
2016-08-22 08:42:45 -07:00
Pfifer, Justin
4cbb6d851e Prevent Spurious Info Message on getIterator
Clean up check for ShardIteratorType to prevent emitting a spurious message for every call to GetIterator
Add missing KinesisProxyTest, and add 3 new tests for getIterator.
2016-08-22 08:26:22 -07:00
Justin Pfifer
a02022fb0f Merge pull request #97 from pfifer/shard-info-equals
Don't Use Checkpoint for Equality in ShardInfo
2016-08-17 14:59:43 -07:00
Pfifer, Justin
6ea3c0f8dd Don't Use Checkpoint for Equality in ShardInfo
Don't include checkpoint in hashCode/equality for ShardInfo, since it
changes. Checkpointing would cause the Worker to recreate the
ShardConsumer.  Add unit tests that verify the equality constraints.

Remove the equality test for checkpoint from ShardInfoTests.  Nothing
appears to rely on the checkpoint being part of ShardInfo.

Fix WorkerTest broken in overzealous simplification.
2016-08-17 14:46:51 -07:00
Justin Pfifer
17aa07c071 Merge pull request #95 from pfifer/shard-prioritization
Allow Prioritization of Parent Shard Tasks
2016-08-17 08:17:04 -07:00
Pfifer, Justin
85b6b9f151 Allow Prioritization of Parent Shard Tasks
Added a new interface that allows the worker to prioritize which lease
assignment it will work on next.  When using the
ParentsFirstshardprioritization the worker will select parents for
processing before selecting children.  This will prevent ShardConsumers
from spending time sleeping in the WAITING_ON_PARENT_SHARDS state.
2016-08-17 07:45:33 -07:00