You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "PrachiKhobragade (via GitHub)" <gi...@apache.org> on 2023/06/20 20:35:04 UTC

[GitHub] [pinot] PrachiKhobragade commented on a diff in pull request #10946: Add a new SegmentPurger interface method to get record purger based on table configs and schema

PrachiKhobragade commented on code in PR #10946:
URL: https://github.com/apache/pinot/pull/10946#discussion_r1235799724


##########
pinot-core/src/main/java/org/apache/pinot/core/minion/SegmentPurger.java:
##########
@@ -230,6 +230,11 @@ public interface RecordPurgerFactory {
      * Get the {@link RecordPurger} for the given table.
      */
     RecordPurger getRecordPurger(String rawTableName);
+
+    default RecordPurger getRecordPurger(String rawTableName, PinotTaskConfig taskConfig, TableConfig tableConfig,

Review Comment:
   Removed



##########
pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/purge/PurgeTaskExecutor.java:
##########
@@ -77,4 +77,14 @@ protected SegmentZKMetadataCustomMapModifier getSegmentZKMetadataCustomMapModifi
         .singletonMap(MinionConstants.PurgeTask.TASK_TYPE + MinionConstants.TASK_TIME_SUFFIX,
             String.valueOf(System.currentTimeMillis())));
   }
+
+  private static SegmentPurger.RecordPurger getRecordPurger(PinotTaskConfig pinotTaskConfig, String rawTableName,
+      SegmentPurger.RecordPurgerFactory recordPurgerFactory, TableConfig tableConfig, Schema schema) {
+    if (recordPurgerFactory == null) {
+      return null;
+    }
+    SegmentPurger.RecordPurger recordPurger =
+        recordPurgerFactory.getRecordPurger(rawTableName, pinotTaskConfig, tableConfig, schema);
+    return recordPurger != null ? recordPurger : recordPurgerFactory.getRecordPurger(rawTableName);

Review Comment:
   Modified



-- 
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