xiangfu0 commented on code in PR #18001:
URL: https://github.com/apache/pinot/pull/18001#discussion_r3003424784


##########
pinot-controller/src/main/java/org/apache/pinot/controller/ControllerConf.java:
##########
@@ -712,14 +664,13 @@ public int 
getOfflineSegmentIntervalCheckerFrequencyInSeconds() {
             
getProperty(ControllerPeriodicTasksConf.OFFLINE_SEGMENT_INTERVAL_CHECKER_FREQUENCY_PERIOD))
         .filter(period -> isValidPeriodWithLogging(
             
ControllerPeriodicTasksConf.OFFLINE_SEGMENT_INTERVAL_CHECKER_FREQUENCY_PERIOD, 
period))
-        .map(period -> (int) convertPeriodToSeconds(period)).orElseGet(() -> 
getProperty(
-            
ControllerPeriodicTasksConf.DEPRECATED_OFFLINE_SEGMENT_INTERVAL_CHECKER_FREQUENCY_IN_SECONDS,
-            
ControllerPeriodicTasksConf.DEFAULT_OFFLINE_SEGMENT_INTERVAL_CHECKER_FREQUENCY_IN_SECONDS));
+        .map(period -> (int) convertPeriodToSeconds(period))
+        
.orElse(ControllerPeriodicTasksConf.DEFAULT_OFFLINE_SEGMENT_INTERVAL_CHECKER_FREQUENCY_IN_SECONDS);

Review Comment:
   Done. Updated all Javadocs to describe the current `*frequencyPeriod`-only 
behavior and default semantics. See commit 21973a2.



##########
pinot-controller/src/main/java/org/apache/pinot/controller/ControllerConf.java:
##########
@@ -736,14 +687,13 @@ public int 
getRealtimeSegmentValidationFrequencyInSeconds() {
     return 
Optional.ofNullable(getProperty(ControllerPeriodicTasksConf.REALTIME_SEGMENT_VALIDATION_FREQUENCY_PERIOD))
         .filter(period -> isValidPeriodWithLogging(
             
ControllerPeriodicTasksConf.REALTIME_SEGMENT_VALIDATION_FREQUENCY_PERIOD, 
period))
-        .map(period -> (int) convertPeriodToSeconds(period)).orElseGet(
-            () -> 
getProperty(ControllerPeriodicTasksConf.DEPRECATED_REALTIME_SEGMENT_VALIDATION_FREQUENCY_IN_SECONDS,
-                
ControllerPeriodicTasksConf.DEFAULT_REALTIME_SEGMENT_VALIDATION_FREQUENCY_IN_SECONDS));
+        .map(period -> (int) convertPeriodToSeconds(period))
+        
.orElse(ControllerPeriodicTasksConf.DEFAULT_REALTIME_SEGMENT_VALIDATION_FREQUENCY_IN_SECONDS);

Review Comment:
   Done. Javadoc updated in commit 21973a2.



##########
pinot-controller/src/main/java/org/apache/pinot/controller/ControllerConf.java:
##########
@@ -774,14 +724,13 @@ public int 
getBrokerResourceValidationFrequencyInSeconds() {
     return 
Optional.ofNullable(getProperty(ControllerPeriodicTasksConf.BROKER_RESOURCE_VALIDATION_FREQUENCY_PERIOD))
         .filter(period -> isValidPeriodWithLogging(
             
ControllerPeriodicTasksConf.BROKER_RESOURCE_VALIDATION_FREQUENCY_PERIOD, 
period))
-        .map(period -> (int) convertPeriodToSeconds(period)).orElseGet(
-            () -> 
getProperty(ControllerPeriodicTasksConf.DEPRECATED_BROKER_RESOURCE_VALIDATION_FREQUENCY_IN_SECONDS,
-                
ControllerPeriodicTasksConf.DEFAULT_BROKER_RESOURCE_VALIDATION_FREQUENCY_IN_SECONDS));
+        .map(period -> (int) convertPeriodToSeconds(period))
+        
.orElse(ControllerPeriodicTasksConf.DEFAULT_BROKER_RESOURCE_VALIDATION_FREQUENCY_IN_SECONDS);

Review Comment:
   Done. Javadoc updated in commit 21973a2.



##########
pinot-controller/src/main/java/org/apache/pinot/controller/ControllerConf.java:
##########
@@ -876,25 +822,13 @@ public int getSegmentRelocatorFrequencyInSeconds() {
     return 
Optional.ofNullable(getProperty(ControllerPeriodicTasksConf.SEGMENT_RELOCATOR_FREQUENCY_PERIOD))
         .filter(period -> isValidPeriodWithLogging(
             ControllerPeriodicTasksConf.SEGMENT_RELOCATOR_FREQUENCY_PERIOD, 
period))
-        .map(period -> (int) convertPeriodToSeconds(period)).orElseGet(() -> {
-          Integer segmentRelocatorFreqSeconds =
-              
getProperty(ControllerPeriodicTasksConf.DEPRECATED_SEGMENT_RELOCATOR_FREQUENCY_IN_SECONDS,
 Integer.class);
-          if (segmentRelocatorFreqSeconds == null) {
-            String realtimeSegmentRelocatorPeriod =
-                
getProperty(ControllerPeriodicTasksConf.DEPRECATED_REALTIME_SEGMENT_RELOCATOR_FREQUENCY);
-            if (realtimeSegmentRelocatorPeriod != null) {
-              segmentRelocatorFreqSeconds = (int) 
convertPeriodToSeconds(realtimeSegmentRelocatorPeriod);
-            } else {
-              segmentRelocatorFreqSeconds = 
ControllerPeriodicTasksConf.DEFAULT_SEGMENT_RELOCATOR_FREQUENCY_IN_SECONDS;
-            }
-          }
-          return segmentRelocatorFreqSeconds;
-        });
+        .map(period -> (int) convertPeriodToSeconds(period))
+        
.orElse(ControllerPeriodicTasksConf.DEFAULT_SEGMENT_RELOCATOR_FREQUENCY_IN_SECONDS);

Review Comment:
   Done. Javadoc updated in commit 21973a2.



##########
pinot-controller/src/main/java/org/apache/pinot/controller/ControllerConf.java:
##########
@@ -1340,14 +1272,8 @@ public int getPinotTaskQueueWarningThreshold() {
    * REALTIME_SEGMENT_RELOCATION_INITIAL_DELAY_IN_SECONDS
    */
   public long getSegmentRelocatorInitialDelayInSeconds() {
-    Long segmentRelocatorInitialDelaySeconds =
-        
getProperty(ControllerPeriodicTasksConf.SEGMENT_RELOCATOR_INITIAL_DELAY_IN_SECONDS,
 Long.class);
-    if (segmentRelocatorInitialDelaySeconds == null) {
-      segmentRelocatorInitialDelaySeconds =
-          
getProperty(ControllerPeriodicTasksConf.DEPRECATED_REALTIME_SEGMENT_RELOCATION_INITIAL_DELAY_IN_SECONDS,
-              ControllerPeriodicTasksConf.getRandomInitialDelayInSeconds());
-    }
-    return segmentRelocatorInitialDelaySeconds;
+    return 
getProperty(ControllerPeriodicTasksConf.SEGMENT_RELOCATOR_INITIAL_DELAY_IN_SECONDS,
+        ControllerPeriodicTasksConf.getRandomInitialDelayInSeconds());

Review Comment:
   Done. Javadoc updated in commit 21973a2.



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