smengcl commented on code in PR #7010:
URL: https://github.com/apache/ozone/pull/7010#discussion_r1746163095


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ReplicationManager.java:
##########
@@ -1312,6 +1319,46 @@ public double getInflightReplicationLimitFactor() {
       return inflightReplicationLimitFactor;
     }
 
+    @Config(key = "inflight.off-peak.hour",
+        type = ConfigType.STRING,
+        defaultValue = "-1",
+        reconfigurable = true,
+        tags = { SCM },
+        description = "Set the time information of the replication off-peak 
period. " +
+            "The default value -1 means turning off this parameter. The 
normal" +
+            " start time is 0 to 23 hours, separated by commas. For example, 
'0,1,8,9,12'," +
+            "it means 00:00-00:59, 01:00-01:59, 08:00-08:59, 09:00-09:59, 
12:00-12:59"
+    )
+    private String inflightOffPeakHour = "-1";

Review Comment:
   ```suggestion
           description = "Set the hours in a day that are considered off-peak 
periods for replication. " +
               "The default empty value means off, i.e. no off-peak hours set. 
" +
               "Valid configs are hours (each in 24-hour notation, 0-23) 
separated by commas. " +
               "For example, \"0,1,8,9,12\" indicates off-peaks periods of " +
               "00:00-00:59, 01:00-01:59, 08:00-08:59, 09:00-09:59, 12:00-12:59"
       )
       private String inflightOffPeakHour = "";
   ```



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ReplicationManager.java:
##########
@@ -1312,6 +1319,46 @@ public double getInflightReplicationLimitFactor() {
       return inflightReplicationLimitFactor;
     }
 
+    @Config(key = "inflight.off-peak.hour",
+        type = ConfigType.STRING,
+        defaultValue = "-1",

Review Comment:
   ```suggestion
       @Config(key = "inflight.off-peak.hour",
           type = ConfigType.STRING,
           defaultValue = "",
   ```
   
   nit: since this is a `String` config, I think it is more reasonable to use 
an empty string as the **off** switch.
   
   `-1` is usually for `Integer` configs.



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