snleee commented on a change in pull request #6975:
URL: https://github.com/apache/incubator-pinot/pull/6975#discussion_r644338809
##########
File path:
pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/BaseMultipleSegmentsConversionExecutor.java
##########
@@ -138,11 +149,32 @@ protected void postProcess(PinotTaskConfig
pinotTaskConfig) {
taskType + " on table: " + tableNameWithType + ", segments: " +
inputSegmentNames + " got cancelled");
}
+ // Update the segment lineage to indicate that the segment replacement
is in progress.
+ String lineageEntryId = null;
+ if (replaceSegmentsEnabled) {
+ List<String> segmentsFrom =
+
Arrays.stream(inputSegmentNames.split(",")).map(String::trim).collect(Collectors.toList());
+ List<String> segmentsTo =
+
segmentConversionResults.stream().map(SegmentConversionResult::getSegmentName).collect(Collectors.toList());
+ lineageEntryId = SegmentConversionUtils
+ .startSegmentReplace(tableNameWithType, uploadURL, new
StartReplaceSegmentsRequest(segmentsFrom, segmentsTo));
+ }
+
// Upload the tarred segments
for (int i = 0; i < numOutputSegments; i++) {
File convertedTarredSegmentFile = tarredSegmentFiles.get(i);
String resultSegmentName =
segmentConversionResults.get(i).getSegmentName();
+ // Set segment ZK metadata custom map modifier into HTTP header to
modify the segment ZK metadata
+ SegmentZKMetadataCustomMapModifier segmentZKMetadataCustomMapModifier
= getSegmentZKMetadataCustomMapModifier(pinotTaskConfig);
Review comment:
I think that we should pass `SegmentConversionResult` instead of
`resultSegmentName`. There's a `customProperties` and we can probably use that
field.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]