npawar commented on a change in pull request #3644: Split ValidationManager
duties into separate ControllerPeriodicTasks
URL: https://github.com/apache/incubator-pinot/pull/3644#discussion_r246095918
##########
File path:
pinot-controller/src/main/java/com/linkedin/pinot/controller/ControllerConf.java
##########
@@ -321,58 +342,116 @@ public String getControllerVipProtocol() {
}
public int getRetentionControllerFrequencyInSeconds() {
- if (containsKey(RETENTION_MANAGER_FREQUENCY_IN_SECONDS)) {
- return Integer.parseInt((String)
getProperty(RETENTION_MANAGER_FREQUENCY_IN_SECONDS));
+ if
(containsKey(ControllerPeriodicTasksConf.RETENTION_MANAGER_FREQUENCY_IN_SECONDS))
{
+ return Integer.parseInt((String)
getProperty(ControllerPeriodicTasksConf.RETENTION_MANAGER_FREQUENCY_IN_SECONDS));
}
- return DEFAULT_RETENTION_CONTROLLER_FREQUENCY_IN_SECONDS;
+ return
ControllerPeriodicTasksConf.DEFAULT_RETENTION_CONTROLLER_FREQUENCY_IN_SECONDS;
}
public void setRetentionControllerFrequencyInSeconds(int
retentionFrequencyInSeconds) {
- setProperty(RETENTION_MANAGER_FREQUENCY_IN_SECONDS,
Integer.toString(retentionFrequencyInSeconds));
+
setProperty(ControllerPeriodicTasksConf.RETENTION_MANAGER_FREQUENCY_IN_SECONDS,
+ Integer.toString(retentionFrequencyInSeconds));
+ }
+
+ private int getValidationControllerFrequencyInSeconds() {
+ if
(containsKey(ControllerPeriodicTasksConf.DEPRECATED_VALIDATION_MANAGER_FREQUENCY_IN_SECONDS))
{
+ return Integer.parseInt(
+ (String)
getProperty(ControllerPeriodicTasksConf.DEPRECATED_VALIDATION_MANAGER_FREQUENCY_IN_SECONDS));
+ }
+ return
ControllerPeriodicTasksConf.DEPRECATED_DEFAULT_VALIDATION_CONTROLLER_FREQUENCY_IN_SECONDS;
+ }
+
+ /**
+ * Returns the config value for
controller.offline.segment.interval.checker.frequencyInSeconds if it exists.
+ * If it doesn't exist, returns the segment level validation interval. This
is done in order to retain the current behavior,
+ * wherein the offline validation tasks were done at segment level
validation interval frequency
+ * @return
+ */
+ public int getOfflineSegmentIntervalCheckerFrequencyInSeconds() {
+ if
(containsKey(ControllerPeriodicTasksConf.OFFLINE_SEGMENT_INTERVAL_CHECKER_FREQUENCY_IN_SECONDS))
{
+ return Integer.parseInt(
+ (String)
getProperty(ControllerPeriodicTasksConf.OFFLINE_SEGMENT_INTERVAL_CHECKER_FREQUENCY_IN_SECONDS));
+ }
+ return getSegmentLevelValidationIntervalInSeconds();
+ }
+
+ public void setOfflineSegmentIntervalCheckerFrequencyInSeconds(int
validationFrequencyInSeconds) {
+
setProperty(ControllerPeriodicTasksConf.OFFLINE_SEGMENT_INTERVAL_CHECKER_FREQUENCY_IN_SECONDS,
+ Integer.toString(validationFrequencyInSeconds));
+ }
+
+ /**
+ * Returns the config value for
controller.realtime.segment.validation.frequencyInSeconds if it exists.
+ * If it doesn't exist, returns the validation controller frequency. This is
done in order to retain the current behavior,
+ * wherein the realtime validation tasks were done at validation controller
frequency
+ * @return
+ */
+ public int getRealtimeSegmentValidationFrequencyInSeconds() {
+ if
(containsKey(ControllerPeriodicTasksConf.REALTIME_SEGMENT_VALIDATION_FREQUENCY_IN_SECONDS))
{
+ return Integer.parseInt(
+ (String)
getProperty(ControllerPeriodicTasksConf.REALTIME_SEGMENT_VALIDATION_FREQUENCY_IN_SECONDS));
+ }
+ return getValidationControllerFrequencyInSeconds();
Review comment:
That was done to totally preserve older behavior.
Changed this to reflect new defaults after our discussion offline
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]