somandal commented on code in PR #16856:
URL: https://github.com/apache/pinot/pull/16856#discussion_r2363681839
##########
pinot-controller/src/main/java/org/apache/pinot/controller/validation/OfflineSegmentValidationManager.java:
##########
@@ -47,20 +48,22 @@
* 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<Void> {
Review Comment:
is this class rename really required?
##########
pinot-controller/src/main/java/org/apache/pinot/controller/validation/OfflineSegmentValidationManager.java:
##########
@@ -73,10 +76,23 @@ protected void processTable(String tableNameWithType) {
LOGGER.warn("Failed to find table config for table: {}, skipping
validation", tableNameWithType);
return;
}
+ updateResourceUtilizationMetric(tableNameWithType);
validateOfflineSegmentPush(tableConfig);
}
}
+ private void updateResourceUtilizationMetric(String tableNameWithType) {
+ if
(_resourceUtilizationManager.isResourceUtilizationWithinLimits(tableNameWithType,
+ UtilizationChecker.CheckPurpose.TASK_GENERATION) ==
UtilizationChecker.CheckResult.FAIL) {
Review Comment:
what if the result is `UNDETERMINED` you'll need to handle that (basically
don't update the metric at all so as to not reset incorrectly)
--
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]