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

extend a bit on the FileUploadDownloadClient #7751

Merged
merged 2 commits into from
Nov 11, 2021

Conversation

klsince
Copy link
Contributor

@klsince klsince commented Nov 11, 2021

Description

Extended a bit on the FileUploadDownloadClient to send post request with json body. I tried not to make it too generic, like passing in http params and headers, but lemme know if that's actually preferred.

Upgrade Notes

Does this PR prevent a zero down-time upgrade? (Assume upgrade order: Controller, Broker, Server, Minion)

  • Yes (Please label as backward-incompat, and complete the section below on Release Notes)

Does this PR fix a zero-downtime upgrade introduced earlier?

  • Yes (Please label this as backward-incompat, and complete the section below on Release Notes)

Does this PR otherwise need attention when creating release notes? Things to consider:

  • New configuration options
  • Deprecation of configurations
  • Signature changes to public methods/interfaces
  • New plugins added or old plugins removed
  • Yes (Please label this PR as release-notes and complete the section on Release Notes)

Release Notes

Documentation

@codecov-commenter
Copy link

codecov-commenter commented Nov 11, 2021

Codecov Report

Merging #7751 (80d1e66) into master (94d3c5f) will increase coverage by 40.70%.
The diff coverage is 0.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             master    #7751       +/-   ##
=============================================
+ Coverage     30.83%   71.54%   +40.70%     
- Complexity        0     4067     +4067     
=============================================
  Files          1568     1577        +9     
  Lines         80194    80552      +358     
  Branches      11929    11971       +42     
=============================================
+ Hits          24731    57629    +32898     
+ Misses        53345    19047    -34298     
- Partials       2118     3876     +1758     
Flag Coverage Δ
integration1 29.14% <0.00%> (+0.04%) ⬆️
integration2 27.84% <0.00%> (-0.02%) ⬇️
unittests1 68.65% <0.00%> (?)
unittests2 14.54% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...e/pinot/common/utils/FileUploadDownloadClient.java 63.56% <0.00%> (+3.64%) ⬆️
...a/manager/realtime/RealtimeSegmentDataManager.java 50.00% <0.00%> (-25.00%) ⬇️
...r/helix/SegmentOnlineOfflineStateModelFactory.java 58.49% <0.00%> (-4.72%) ⬇️
...n/src/main/java/org/apache/pinot/common/Utils.java 60.46% <0.00%> (-2.33%) ⬇️
...core/query/executor/ServerQueryExecutorV1Impl.java 82.87% <0.00%> (-1.66%) ⬇️
...pache/pinot/core/query/utils/idset/EmptyIdSet.java 25.00% <0.00%> (ø)
...ache/pinot/common/metadata/ZKMetadataProvider.java 81.95% <0.00%> (ø)
...pinot/core/query/request/context/TimerContext.java 91.66% <0.00%> (ø)
...anager/realtime/SegmentBuildTimeLeaseExtender.java 63.23% <0.00%> (ø)
...he/pinot/ingestion/utils/JobPreparationHelper.java 0.00% <0.00%> (ø)
... and 1045 more

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 94d3c5f...80d1e66. Read the comment docs.

@@ -578,6 +578,18 @@ public SimpleHttpResponse sendDeleteRequest(URI uri, String authToken)
return sendRequest(requestBuilder.build());
}

public SimpleHttpResponse postJsonRequest(URI uri, String jsonRequestBody, String authToken)
Copy link
Contributor

Choose a reason for hiding this comment

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

Annotate jsonRequestBody as nullable.

Side question: Could authToken be null? Will it work properly when it is null?

@Jackie-Jiang Jackie-Jiang merged commit 8442beb into apache:master Nov 11, 2021
kriti-sc pushed a commit to kriti-sc/incubator-pinot that referenced this pull request Dec 12, 2021
Extended a bit on the FileUploadDownloadClient to send post request with json body. I tried not to make it too generic, like passing in http params and headers, but lemme know if that's actually preferred.
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