Jackie-Jiang commented on a change in pull request #8203:
URL: https://github.com/apache/pinot/pull/8203#discussion_r807372372
##########
File path:
pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/BaseMultipleSegmentsConversionExecutor.java
##########
@@ -89,6 +92,49 @@ protected void preProcess(PinotTaskConfig pinotTaskConfig) {
protected void postProcess(PinotTaskConfig pinotTaskConfig) {
}
+ protected Map<String, Object> preUploadSegments(PinotTaskConfig
pinotTaskConfig,
+ List<SegmentConversionResult> segmentConversionResults)
+ throws Exception {
+ // Update the segment lineage to indicate that the segment replacement is
in progress.
+ Map<String, String> configs = pinotTaskConfig.getConfigs();
+ String replaceSegmentsString =
configs.get(MinionConstants.ENABLE_REPLACE_SEGMENTS_KEY);
+ boolean replaceSegmentsEnabled =
Boolean.parseBoolean(replaceSegmentsString);
+
+ Map<String, Object> uploadContext = new HashMap<>();
+ if (replaceSegmentsEnabled) {
+ String tableNameWithType = configs.get(MinionConstants.TABLE_NAME_KEY);
+ String inputSegmentNames = configs.get(MinionConstants.SEGMENT_NAME_KEY);
+ String uploadURL = configs.get(MinionConstants.UPLOAD_URL_KEY);
+ String authToken = configs.get(MinionConstants.AUTH_TOKEN);
Review comment:
These info are extracted multiple times. Shall we consider adding a
context class to wrap them and pass them into this method? We can also have a
custom map within the context class so that other custom fields can be added.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]