somandal commented on code in PR #16856:
URL: https://github.com/apache/pinot/pull/16856#discussion_r2379766830


##########
pinot-controller/src/main/java/org/apache/pinot/controller/validation/OfflineSegmentValidationManager.java:
##########
@@ -47,24 +51,44 @@
  * Manages the segment validation metrics, to ensure that all offline segments 
are contiguous (no missing segments) and
  * that the offline push delay isn't too high.
  */
-public class OfflineSegmentIntervalChecker extends 
ControllerPeriodicTask<Void> {
-  private static final Logger LOGGER = 
LoggerFactory.getLogger(OfflineSegmentIntervalChecker.class);
+public class OfflineSegmentValidationManager extends 
ControllerPeriodicTask<OfflineSegmentValidationManager.Context> {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(OfflineSegmentValidationManager.class);
 
   private final ValidationMetrics _validationMetrics;
   private final boolean _segmentAutoResetOnErrorAtValidation;
+  private final ResourceUtilizationManager _resourceUtilizationManager;
+  private final int _segmentLevelValidationIntervalInSeconds;
+  // Legacy frequency setting maintained for backward compatibility
+  private final int _offlineSegmentIntervalCheckerFrequencyInSeconds;
+  private long _lastSegmentLevelValidationRunTimeMs = 0L;
 
-  public OfflineSegmentIntervalChecker(ControllerConf config, 
PinotHelixResourceManager pinotHelixResourceManager,
+  public OfflineSegmentValidationManager(ControllerConf config, 
PinotHelixResourceManager pinotHelixResourceManager,
       LeadControllerManager leadControllerManager, ValidationMetrics 
validationMetrics,
-      ControllerMetrics controllerMetrics) {
-    super("OfflineSegmentIntervalChecker", 
config.getOfflineSegmentIntervalCheckerFrequencyInSeconds(),
-        config.getOfflineSegmentIntervalCheckerInitialDelayInSeconds(), 
pinotHelixResourceManager,
+      ControllerMetrics controllerMetrics, ResourceUtilizationManager 
resourceUtilizationManager) {
+    super("OfflineSegmentIntervalChecker", 
config.getOfflineSegmentValidationFrequencyInSeconds(),

Review Comment:
   shouldn't the task name be changed?
   Also, for configs, will the older name be used or the new name? won't that 
be confusing for end users?



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

Reply via email to