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

Document Sink connection configurations: socket_timeout and connect_t… #563

Merged
merged 2 commits into from
Nov 15, 2021

Conversation

jianghancn
Copy link
Contributor

@jianghancn jianghancn commented Nov 11, 2021

…imeout

Signed-off-by: Han Jiang [email protected]

Description

Document Sink connection configurations: socket_timeout and connect_timeout

Reference: https://www.javadoc.io/doc/org.apache.httpcomponents/httpclient/4.5.5/org/apache/http/client/config/RequestConfig.html#getConnectTimeout()

Issues Resolved

NA

Check List

  • [ x] New functionality includes testing.
    • [x ] All tests pass
  • [ x] New functionality has been documented.
    • [x ] New functionality has javadoc added
  • [x ] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@codecov-commenter
Copy link

Codecov Report

Merging #563 (30d2cb7) into main (52e0468) will decrease coverage by 0.11%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #563      +/-   ##
============================================
- Coverage     92.28%   92.17%   -0.12%     
+ Complexity      569      566       -3     
============================================
  Files            71       71              
  Lines          1725     1725              
  Branches        144      144              
============================================
- Hits           1592     1590       -2     
  Misses          102      102              
- Partials         31       33       +2     
Impacted Files Coverage Δ
...com/amazon/dataprepper/pipeline/ProcessWorker.java 85.71% <0.00%> (-5.72%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52e0468...30d2cb7. Read the comment docs.

@@ -74,6 +74,10 @@ Default is null.

- `insecure`: A boolean flag to turn off SSL certificate verification. If set to true, CA certificate verification will be turned off and insecure HTTP requests will be sent. Default to `false`.

- `socket_timeout`(optional): An integer value indicates the timeout in milliseconds for waiting for data (or, put differently, a maximum period inactivity between two consecutive data packets). A timeout value of zero is interpreted as an infinite timeout. A negative value is interpreted as undefined (system default if applicable). Default: -1.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A negative value is interpreted as undefined (system default if applicable). Default: -1.

This says that a negative value is undefined and then says the default is negative.

I know this comes from the Apache documentation. But, this is confusing in the context of the Data Prepper documentation.

There might be a better way to state this. Maybe even saying that this value is part of the underlying HTTP framework would help.

And what is the system in system default? Data Prepper, the OS? Once I read the Apache HTTP documentation it was clear, because I knew the context better. But here it is a little confusing since the system could be Data Prepper.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point!

I re-phrased the sentence to something like "If this timeout value is either negative or not set, the underlying Apache HttpClient would rely on operating system settings for managing connection timeouts", hoping it's clearer now. Let me know if you have further suggestions. Thanks.

@jianghancn jianghancn requested a review from a team as a code owner November 15, 2021 20:11
@jianghancn jianghancn merged commit a88d7dd into opensearch-project:main Nov 15, 2021
dapowers87 pushed a commit to dapowers87/data-prepper that referenced this pull request Nov 18, 2021
opensearch-project#563)

* Document Sink connection configurations: socket_timeout and connect_timeout
Signed-off-by: Han Jiang <[email protected]>

* Re-phrase timeout parameter descriptions to make them clearer to DP users.
Signed-off-by: Han Jiang <[email protected]>
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.

3 participants