You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/02/15 23:10:43 UTC

[GitHub] [pinot] klsince commented on a change in pull request #8203: Allow subclass to customize what happens pre/post segment uploading

klsince commented on a change in pull request #8203:
URL: https://github.com/apache/pinot/pull/8203#discussion_r807395121



##########
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:
       sgtm




-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org