Allow moveToFinalLocation in METADATA push based on config#8823
Allow moveToFinalLocation in METADATA push based on config#8823npawar merged 7 commits intoapache:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8823 +/- ##
============================================
- Coverage 69.60% 66.43% -3.18%
+ Complexity 4997 4669 -328
============================================
Files 1806 1355 -451
Lines 94202 68423 -25779
Branches 14050 10677 -3373
============================================
- Hits 65571 45456 -20115
+ Misses 24072 19738 -4334
+ Partials 4559 3229 -1330
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Jackie-Jiang
left a comment
There was a problem hiding this comment.
LGTM. Only non-blocking comments
pinot-common/src/main/java/org/apache/pinot/common/utils/FileUploadDownloadClient.java
Outdated
Show resolved
Hide resolved
...ava/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java
Outdated
Show resolved
Hide resolved
...ava/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Suggest not introducing upload type into this module. When it is configured to copy the segment to the deep store, we can check if sourceDownloadURIStr is provided, and copy accordingly.
There was a problem hiding this comment.
Suggest not introducing upload type into this module. When it is configured to copy the segment to the deep store, we can check if sourceDownloadURIStr is provided, and copy accordingly.
There was a problem hiding this comment.
Addressed all other comments. For this one, I kinda prefer keeping the uploadType, so it is very clear when reading. Don't want to rely on sourceDownloadURIStr as it can be non-null even in URI push case, but we want to use segment file in that case.
pinot-controller/src/main/java/org/apache/pinot/controller/api/upload/ZKOperator.java
Outdated
Show resolved
Hide resolved
pinot-controller/src/main/java/org/apache/pinot/controller/api/upload/ZKOperator.java
Outdated
Show resolved
Hide resolved
pinot-controller/src/main/java/org/apache/pinot/controller/api/upload/ZKOperator.java
Outdated
Show resolved
Hide resolved
...sts/src/test/java/org/apache/pinot/integration/tests/SegmentMetadataPushIntegrationTest.java
Outdated
Show resolved
Hide resolved
...sts/src/test/java/org/apache/pinot/integration/tests/SegmentMetadataPushIntegrationTest.java
Outdated
Show resolved
Hide resolved
walterddr
left a comment
There was a problem hiding this comment.
looks good to me. i only have some minor questions. please kindly take a look
METADATApush didn't allow the option ofmoveSegmentToFinalLocation. This meant that if someone had generated segments in a location that was not the deep store, there was absolutely no way to move those segments into deep store without manual scripting.Chatting with @xiangfu0 , I understood that this was done on purpose, in order to keep METADATA push very light weight and not involve copying from
outputDirtodataDirin the push. But this is a very valid scenario where users would want to generate segments in a location other than deep store, and still want to useMETADATApush (reasons could be multiple, as listed in #7328).While there have been more elaborate solutions proposed in the issue above (like periodic background tasks), this PR simply enables one to allow
METADATApush to domoveToFinalLocation. And while this would increase the data push time, it is a better solution than asking users to switch toSegmentTarPushorSegmentUriPush, especially if the issue was disparate permissions between outputDir ad dataDir (one of the reasons mentioned in the issue).Backward compatible behavior or this being
falseby default is maintained.Added an integration test.