Commit graph

19 commits

Author SHA1 Message Date
lucienlu-aws
96be30b3e7
Change agedFailoverTimeMultiplier config to doPriorityLeaseTaking (#1317)
* Change agedFailoverTimeMultiplier config to doPriorityLeaseTaking
2024-04-22 10:35:08 -07:00
lucienlu-aws
981899499f
Expose veryOldLeaseDurationMultiplier in LeaseManagementConfig (#1307)
* Expose veryOldLeaseDurationMultiplier in LeaseManagementConfig as agedFailoverTimeMultiplier
2024-04-10 11:24:53 -07:00
Aravinda Kidambi Srinivasan
44837b702a
Fix an issue in configuring idleTimeBetweenReadsInMillis in MultiLangDaemon (#1230)
Fix an issue where the idleTimeBetweenReadInMillis configured
via MultiLangDaemon was not taking effect because it used
the auto-generated setter from Lombok to set the configured value,
while there is a custom setter that must be invoked to set the
value correctly.

There is also a general confusion between using Lombok's setter vs
custom setter in java.

Unifying the approach to use the custom Lombok-fluent-style setter
and deprecating the previously added custom setIdleTimeBetweenReadsInMillis

Correct way to configure idleTimeBetweenReadsInMillis for MultiLang is
to add this in the properties file:
idleTimeBetweenReadsInMillis = 10000 # 10 seconds

Correct way to configure for java:
configsBuilder.retrievalConfig().retrievalSpecificConfig(
    new PollingConfig(streamName, kinesisClient)
        .idleTimeBetweenReadsInMillis(Duration.ofSeconds(10).toMillis())

Issues: #999, #950, #515
2023-11-22 17:30:41 -08:00
stair
2f4ff65681
[#367] Enhanced multi-lang AWSCredentialsProvider=... decoder and c… (#1184)
* [#367] Enhanced multi-lang `AWSCredentialsProvider=...` decoder and construction.

+ added support for external ids (issue #367)
+ added support for endpoint+region (e.g., STS via VPC)

* Multiple multi-lang edits to introduce logging and additional tests.

+ added `ENDPOINT_REGION` nested key for a simpler Cx experience
+ deduplicated, and improved, logic w.r.t. CredentialsProvider
construction to NOT swallow Exceptions

* Relocated `multilang.properties` from `main/resources` to `test/resources`
2023-08-07 16:29:49 -04:00
stair
8d1ee6b5e1
Checkstyle: tightened LineLength restriction from 170 to 150. (#1158) 2023-07-06 10:24:14 -07:00
stair
a9b0d00852
Checkstyle: added additional checks to, primarily, safeguard against bugs. (#1154) 2023-06-27 15:24:03 -04:00
stair
768f6a36bb
Checkstyle: added UnusedImports check. (#1153) 2023-06-26 16:19:30 -04:00
stair
74d8f4b780
Enabled Checkstyle validation of test resources. (#1150)
No functional change.
2023-06-26 15:25:10 -04:00
pelaezryan
dcd1c53fb1
Update to Multilang Daemon to support StreamArn (#1143)
* Updated multilang to support streamArn

* Updated arn import to use software.amzon instead of com.amazonaws, also updated unit tests to be more explicit with the expected exceptions

* Updated exception wording for region validation in StreamArn to be more consistent with other error messages

* reverted spacing change

* Updated StreamArn in multilang to only replace streamName (not region as well). Also updated unit tests and added Region validation

* Updated region validation in multilang to be more readible

* Refactored multilang unit tests to be more simple

* Updated multilang daemon to validate streamArn based on pattern rather than individual section

* removed region validation as this was not a requirement for stringArn support in multilangdaemon

* removed spacing and removed unit test assertion on exception message

* removed unnecessary param from unit test

* removed unused imports from multilang unit tests

* simplified the assertion for multilang daemon unit tests

* Cleaned up unit test code following best practices for spacing/naming conventions and simplied kinesisClientLibConfiguration

* Updated region code in unit tests for multilang daemon

---------

Co-authored-by: Ryan Pelaez <rmpelaez@amazon.com>
2023-06-26 09:02:19 -07:00
kevin
afee84d7da Add more unit tests for exception cases 2021-05-10 13:48:37 -07:00
kevin
362e086d5d Create shared timestamp for testWithInitialPositionInStreamExtended 2021-05-10 10:51:13 -07:00
kevin
6e0cbb905d Allow InitialPositionInStreamExtended to be specified in properties file
E.g. initialPositionInStreamExtended = 1617305352
2021-04-05 12:07:30 -07:00
Joshua Kim
0c5042dadf
Release v2.13.0 (#736) 2020-08-17 18:50:19 -04:00
awslankakamal
6c64055d9b Updating license to Apache License 2.0 (#523) 2019-04-05 15:25:09 -07:00
Justin Pfifer
a15713911c Set the region for test runs (#488)
The AWS SDK depends on being able to find which region it should
operate in.  In many cases this is either explicitly set or retrieved
from a variety of sources.  For these test cases we don't actually
care what the region. To ensure that the tests operate as expected the
region is set before the test runs, and reset upon completion.
2019-01-29 18:53:54 -08:00
Sahil Palvia
03c15eb275
Introducing MultiLangDaemon support: (#483)
* Introducing MultiLangDaemon support for Enhanced Fan-Out.
* MultiLangDaemon now supports the following command line options.
  * `--properties-file`: Properties file that the KCL should use to set up the Scheduler.
  * `--log-configuration`: logback.xml that the KCL should use for logging.
* Updated AWS SDK dependency to 2.2.0.
* MultiLangDaemon now uses logback for logging.
2019-01-14 17:35:35 -08:00
Sahil Palvia
0ec3004b0b Updating the import in the configuration test. 2018-08-27 13:12:28 -07:00
Pfifer, Justin
978fe2671e Cleanup a merge artifact 2018-08-02 12:32:44 -07:00
Pfifer, Justin
258be9a504 Release 2.0.0 of the Amazon Kinesis Client for Java
* Added support for Enhanced Fan Out.
  Enhanced Fan Out provides for lower end to end latency, and increased number of consumers per stream.
  * Records are now delivered via streaming, reducing end-to-end latency.
  * The Amazon Kinesis Client will automatically register a new consumer if required.
    When registering a new consumer, the Kinesis Client will default to the application name unless configured otherwise.
  * New configuration options are available to configure Enhanced Fan Out.
  * `SubscribeToShard` maintains long lived connections with Kinesis, which in the AWS Java SDK 2.0 is limited by default.
    The `KinesisClientUtil` has been added to assist configuring the `maxConcurrency` of the `KinesisAsyncClient`.
    __WARNING: The Amazon Kinesis Client may see significantly increased latency, unless the `KinesisAsyncClient` is configured to have a `maxConcurrency` high enough to allow all leases plus additional usages of the `KinesisAsyncClient`.__

  | Name            | Default | Description                                                                                                         |
  |-----------------|---------|---------------------------------------------------------------------------------------------------------------------|
  | consumerArn     | Unset   | The ARN for an already created consumer.  If this is set, the Kinesis Client will not attempt to create a consumer. |
  | streamName      | Unset   | The name of the stream that a consumer should be create for if necessary                                            |
  | consumerName    | Unset   | The name of the consumer to create.  If this is not set the applicationName will be used instead.                   |
  | applicationName | Unset   | The name of the application.  This is used as the name of the consumer unless consumerName is set.                  |

* Modular Configuration of the Kinesis Client
  The Kinesis Client has migrated to a modular configuration system, and the `KinesisClientLibConfiguration` class has been removed.
  Configuration has been split into 7 classes.  Default versions of the configuration can be created from the `ConfigsBuilder`.
  Please see the migration guide for more information
  * `CheckpointConfig`
  * `CoordinatorConfig`
  * `LeaseManagementConfig`
  * `LifecycleConfig`
  * `MetricsConfig`
  * `ProcessorConfig`
  * `RetrievalConfig`

* Upgraded to AWS Java SDK 2.0
  The Kinesis Client now uses the AWS Java SDK 2.0.  The dependency on AWS Java SDK 1.11 has been removed.
  All configurations will only accept 2.0 clients.
  * When configuring the `KinesisAsyncClient` the `KinesisClientUtil#createKinesisAsyncClient` can be used to configure the Kinesis Client
  * __If you need support for AWS Java SDK 1.11 you will need to add a direct dependency.__
    __When adding a dependency you must ensure that the 1.11 versions of Jackson dependencies are excluded__
    Please see the migration guide for more information

* MultiLangDaemon is now a separate module
  The MultiLangDaemon has been separated to its own Maven module and is no longer available in `amazon-kinesis-client`.  To include the MultiLangDaemon, add a dependency on `amazon-kinesis-client-multilang`.
2018-08-02 12:19:46 -07:00