You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "sandeep-mst (via GitHub)" <gi...@apache.org> on 2025/07/07 19:47:36 UTC
[PR] [improve][io] Add support for the complete KinesisProducerConfiguration in KinesisSinkConfig [pulsar]
sandeep-mst opened a new pull request, #24489:
URL: https://github.com/apache/pulsar/pull/24489
<!--
### Contribution Checklist
- PR title format should be *[type][component] summary*. For details, see *[Guideline - Pulsar PR Naming Convention](https://pulsar.apache.org/contribute/develop-semantic-title/)*.
- Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
- Each pull request should address only one issue, not mix up code from multiple issues.
- Each commit in the pull request has a meaningful commit message
- Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
-->
<!-- Either this PR fixes an issue, -->
Fixes #24422
<!-- or this PR is one task of an issue -->
<!-- If the PR belongs to a PIP, please add the PIP link here -->
<!-- Details of when a PIP is required and how the PIP process work, please see: https://github.com/apache/pulsar/blob/master/pip/README.md -->
### Motivation
<!-- Explain here the context, and why you're making that change. What is the problem you're trying to solve. -->
The Apache Pulsar KinesisSink utilises the KinesisProducer from the KPL. The KPL provides a comprehensive set of configuration parameters through its KinesisProducerConfiguration class.
In the current KinesisSink implementation, most of these parameters such as collectionMaxCount, collectionMaxSize, connectTimeout, maxConnections, and minConnections—are not configurable. This restricts users' ability to optimise the sink's performance, or meet network and operational requirements potentially affecting throughput, latency, and resource utilisation.
### Modifications
<!-- Describe the modifications you've done. -->
- Added the following KPL configuration parameters directly into the KinesisSink configuration.
| Parameter | Description |
|--------|--------|
| collectionMaxCount | Maximum number of items to pack into an PutRecords request. |
| collectionMaxSize | Maximum amount of data to send with a PutRecords request. |
| connectTimeout | Timeout (milliseconds) for establishing TLS connections. |
| credentialsRefreshDelay | How often to refresh credentials (in milliseconds). |
| maxConnections | Maximum number of connections to open to the backend. |
| minConnections | Minimum number of connections to keep open to the backend |
| rateLimit | Limits the maximum allowed put rate for a shard, as a percentage of the backend limits. |
| recordTtl | Set a time-to-live on records (milliseconds). |
| requestTimeout | The maximum total time (milliseconds) allowed for a HTTP request |
- Introduce an Optional Hashmap for Additional Configuration (extraKinesisProducerConfiguration), which accepts a hashmap of key-value pairs corresponding to any other KPL configuration parameters not directly exposed. This ensures users retain full control over the KinesisProducer's behavior without overloading the primary sink configuration interface.
### Verifying this change
- [x] Make sure that the change passes the CI checks.
*(Please pick either of the following options)*
This change added tests and can be verified as follows:
- *Will be updated*
### Does this pull request potentially affect one of the following parts:
<!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
*If the box was checked, please highlight the changes*
- [ ] Dependencies (add or upgrade a dependency)
- [ ] The public API
- [ ] The schema
- [ ] The default values of configurations
- [ ] The threading model
- [ ] The binary protocol
- [ ] The REST endpoints
- [ ] The admin CLI options
- [ ] The metrics
- [ ] Anything that affects deployment
### Documentation
<!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
- [ ] `doc` <!-- Your PR contains doc changes. -->
- [x] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->
### Matching PR in forked repository
PR in forked repository: <!-- ENTER URL HERE -->
https://github.com/cognitree/pulsar/pull/25
<!--
After opening this PR, the build in apache/pulsar will fail and instructions will
be provided for opening a PR in the PR author's forked repository.
apache/pulsar pull requests should be first tested in your own fork since the
apache/pulsar CI based on GitHub Actions has constrained resources and quota.
GitHub Actions provides separate quota for pull requests that are executed in
a forked repository.
The tests will be run in the forked repository until all PR review comments have
been handled, the tests pass and the PR is approved by a reviewer.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [improve][io] Add support for the complete KinesisProducerConfiguration in KinesisSinkConfig [pulsar]
Posted by "sandeep-mst (via GitHub)" <gi...@apache.org>.
sandeep-mst commented on PR #24489:
URL: https://github.com/apache/pulsar/pull/24489#issuecomment-3062798880
> Could you rebase to master so that the checkstyle check for tests will be applied?
@BewareMyPower
Done. Could we re-trigger workflows.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [improve][io] Add support for the complete KinesisProducerConfiguration in KinesisSinkConfig [pulsar]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #24489:
URL: https://github.com/apache/pulsar/pull/24489#issuecomment-3097844895
> It's weird for this failure:
>
> ```
> Restoring tar from name pulsar-maven-repository-binaries.tar.zst in GitHub Actions Artifacts to /home/runner
> /home/runner/work/_temp/_github_home/.local/bin/gh-actions-artifact-client.js:79024
> throw new ArtifactNotFoundError(`No artifacts found with name: ${name}`);
> ```
>
> @sandeep-mst maybe you have to try merging to master again to re-trigger the build.
>
> BTW, @lhotari do you have any idea about the failure above?
@BewareMyPower yes. Retrying a failed build after 3 days won't work since the GitHub workflow artifacts retention is set to 3 days so that we don't overflow the size of storage. It's necessary to trigger a completely new build in that case. Usually it's recommended to merge master to the PR branch to trigger that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [improve][io] Add support for the complete KinesisProducerConfiguration in KinesisSinkConfig [pulsar]
Posted by "sandeep-mst (via GitHub)" <gi...@apache.org>.
sandeep-mst commented on PR #24489:
URL: https://github.com/apache/pulsar/pull/24489#issuecomment-3097129804
/pulsarbot rerun-failure-checks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [improve][io] Add support for the complete KinesisProducerConfiguration in KinesisSinkConfig [pulsar]
Posted by "sandeep-mst (via GitHub)" <gi...@apache.org>.
sandeep-mst commented on PR #24489:
URL: https://github.com/apache/pulsar/pull/24489#issuecomment-3097774570
@BewareMyPower, @dlg99
The OWASP dependency check is failing on master as well and I have verified that `pulsar-io/kinesis` has no new vulnerabilities.
Is anything else required on this PR?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [improve][io] Add support for the complete KinesisProducerConfiguration in KinesisSinkConfig [pulsar]
Posted by "sandeep-mst (via GitHub)" <gi...@apache.org>.
sandeep-mst commented on PR #24489:
URL: https://github.com/apache/pulsar/pull/24489#issuecomment-3097233724
@BewareMyPower
Rebased to master again.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [improve][io] Add support for the complete KinesisProducerConfiguration in KinesisSinkConfig [pulsar]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #24489:
URL: https://github.com/apache/pulsar/pull/24489#issuecomment-3097581652
## [Codecov](https://app.codecov.io/gh/apache/pulsar/pull/24489?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: Patch coverage is `93.33333%` with `1 line` in your changes missing coverage. Please review.
> Project coverage is 74.33%. Comparing base [(`bbc6224`)](https://app.codecov.io/gh/apache/pulsar/commit/bbc62245c5ddba1de4b1e7cee4ab49334bc36277?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`f609773`)](https://app.codecov.io/gh/apache/pulsar/commit/f609773849783d4fcb2c55aa6856e5c323a3aac7?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> Report is 1208 commits behind head on master.
| [Files with missing lines](https://app.codecov.io/gh/apache/pulsar/pull/24489?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...java/org/apache/pulsar/io/kinesis/KinesisSink.java](https://app.codecov.io/gh/apache/pulsar/pull/24489?src=pr&el=tree&filepath=pulsar-io%2Fkinesis%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2Fio%2Fkinesis%2FKinesisSink.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWlvL2tpbmVzaXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3B1bHNhci9pby9raW5lc2lzL0tpbmVzaXNTaW5rLmphdmE=) | 92.30% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/pulsar/pull/24489?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
[](https://app.codecov.io/gh/apache/pulsar/pull/24489?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #24489 +/- ##
============================================
+ Coverage 73.57% 74.33% +0.76%
- Complexity 32624 32933 +309
============================================
Files 1877 1869 -8
Lines 139502 146105 +6603
Branches 15299 16762 +1463
============================================
+ Hits 102638 108610 +5972
+ Misses 28908 28889 -19
- Partials 7956 8606 +650
```
| [Flag](https://app.codecov.io/gh/apache/pulsar/pull/24489/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [inttests](https://app.codecov.io/gh/apache/pulsar/pull/24489/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `26.88% <ø> (+2.30%)` | :arrow_up: |
| [systests](https://app.codecov.io/gh/apache/pulsar/pull/24489/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `23.27% <0.00%> (-1.05%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/pulsar/pull/24489/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `73.84% <93.33%> (+0.99%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Files with missing lines](https://app.codecov.io/gh/apache/pulsar/pull/24489?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [...rg/apache/pulsar/io/kinesis/KinesisSinkConfig.java](https://app.codecov.io/gh/apache/pulsar/pull/24489?src=pr&el=tree&filepath=pulsar-io%2Fkinesis%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2Fio%2Fkinesis%2FKinesisSinkConfig.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWlvL2tpbmVzaXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3B1bHNhci9pby9raW5lc2lzL0tpbmVzaXNTaW5rQ29uZmlnLmphdmE=) | `90.90% <100.00%> (+10.13%)` | :arrow_up: |
| [...java/org/apache/pulsar/io/kinesis/KinesisSink.java](https://app.codecov.io/gh/apache/pulsar/pull/24489?src=pr&el=tree&filepath=pulsar-io%2Fkinesis%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2Fio%2Fkinesis%2FKinesisSink.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWlvL2tpbmVzaXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3B1bHNhci9pby9raW5lc2lzL0tpbmVzaXNTaW5rLmphdmE=) | `57.53% <92.30%> (+2.91%)` | :arrow_up: |
... and [1100 files with indirect coverage changes](https://app.codecov.io/gh/apache/pulsar/pull/24489/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
</details>
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [improve][io] Add support for the complete KinesisProducerConfiguration in KinesisSinkConfig [pulsar]
Posted by "dlg99 (via GitHub)" <gi...@apache.org>.
dlg99 merged PR #24489:
URL: https://github.com/apache/pulsar/pull/24489
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [improve][io] Add support for the complete KinesisProducerConfiguration in KinesisSinkConfig [pulsar]
Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower commented on PR #24489:
URL: https://github.com/apache/pulsar/pull/24489#issuecomment-3097180381
It's weird for this failure:
```
Restoring tar from name pulsar-maven-repository-binaries.tar.zst in GitHub Actions Artifacts to /home/runner
/home/runner/work/_temp/_github_home/.local/bin/gh-actions-artifact-client.js:79024
throw new ArtifactNotFoundError(`No artifacts found with name: ${name}`);
```
@sandeep-mst maybe you have to try merging to master again to re-trigger the build.
BTW, @lhotari do you have any idea about the failure above?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [improve][io] Add support for the complete KinesisProducerConfiguration in KinesisSinkConfig [pulsar]
Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower commented on PR #24489:
URL: https://github.com/apache/pulsar/pull/24489#issuecomment-3060380286
Could you rebase to master so that the checkstyle check for tests will be applied?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org