Jackie-Jiang commented on a change in pull request #8176:
URL: https://github.com/apache/pinot/pull/8176#discussion_r809608386



##########
File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/SegmentDeletionManager.java
##########
@@ -278,4 +311,36 @@ public void removeAgedDeletedSegments(int retentionInDays) 
{
       LOGGER.info("dataDir is not configured, won't delete any expired 
segments from deleted directory.");
     }
   }
+
+  private String getDeletedSegmentFileName(String fileName, long 
deletedSegmentsRetentionMs) {
+    return fileName + RETENTION_UNTIL_SEPARATOR + 
RETENTION_DATE_FORMAT.format(new Date(
+        System.currentTimeMillis() + deletedSegmentsRetentionMs));
+  }
+
+  private long getDeletionTimeMsFromFile(String targetFile, long 
lastModifiedTime) {
+    String[] split = StringUtils.splitByWholeSeparator(targetFile, 
RETENTION_UNTIL_SEPARATOR);
+    if (split.length == 2) {
+      try {
+        return RETENTION_DATE_FORMAT.parse(split[1]).getTime();
+      } catch (Exception e) {
+        LOGGER.warn("No retention suffix found for file: {}", targetFile);
+      }
+    }
+    LOGGER.info("Fallback to using default cluster retention config: {} ms", 
_defaultDeletedSegmentsRetentionMs);
+    return lastModifiedTime + _defaultDeletedSegmentsRetentionMs;
+  }
+
+  private static @Nullable Long getRetentionMsFromTableConfig(@Nullable 
TableConfig tableConfig) {

Review comment:
       ```suggestion
     @Nullable
     private static Long getRetentionMsFromTableConfig(@Nullable TableConfig 
tableConfig) {
   ```




-- 
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-unsubscr...@pinot.apache.org

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



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

Reply via email to