-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Allow uploading a segment with a different name from HTTP header #7306
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7306 +/- ##
============================================
+ Coverage 71.25% 71.31% +0.06%
+ Complexity 3361 3277 -84
============================================
Files 1503 1503
Lines 74007 74012 +5
Branches 10712 10713 +1
============================================
+ Hits 52730 52783 +53
+ Misses 17667 17621 -46
+ Partials 3610 3608 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a check to make sure that realtime and offline segment names correspond to the format that is required by these tables? Otherwise things can go wrong
@@ -235,7 +237,10 @@ private SuccessResponse uploadSegment(@Nullable String tableName, TableType tabl | |||
SegmentMetadata segmentMetadata = getSegmentMetadata(tempDecryptedFile, tempSegmentDir, metadataProviderClass); | |||
|
|||
// Fetch segment name | |||
String segmentName = segmentMetadata.getName(); | |||
if (!StringUtils.isEmpty(segmentName)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you need to replace the segment name in the metadata file and rewrite the tar file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just to override the segment name when registering the segment in a table. So no need to rewrite the metadata file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does segment load work fine? Used to be that the name in the segment metadata is the source of truth for segment name. Has that changed?
why do we need this feature? |
This is mostly for testing/benchmarking purposes. Right now segment name is hardcoded inside segment metadata, so if I want to upload 10k segments, then I need to generate 10k data files to generate 10k segments then upload. |
will do |
Another useful thing we can do with this feature: |
I think it is a useful feature to have, esp for one-time operation mentioned in |
Allowing custom segment name from HTTP header requires one of the following 2 conditions:
|
Description
Allow uploading a segment with a different name from HTTP header
Sample request for batch quickstarts:
Upgrade Notes
Does this PR prevent a zero down-time upgrade? (Assume upgrade order: Controller, Broker, Server, Minion)
backward-incompat
, and complete the section below on Release Notes)Does this PR fix a zero-downtime upgrade introduced earlier?
backward-incompat
, and complete the section below on Release Notes)Does this PR otherwise need attention when creating release notes? Things to consider:
release-notes
and complete the section on Release Notes)Release Notes
Documentation