You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/08/18 14:31:18 UTC

[GitHub] [hbase] bsglz commented on a change in pull request #2272: HBASE-24898 Can not set 23:00~24:00 as offpeak hour now

bsglz commented on a change in pull request #2272:
URL: https://github.com/apache/hbase/pull/2272#discussion_r472241932



##########
File path: hbase-common/src/main/resources/hbase-default.xml
##########
@@ -917,13 +917,13 @@ possible configurations would overwhelm and obscure the important.
   <property>
     <name>hbase.offpeak.start.hour</name>
     <value>-1</value>
-    <description>The start of off-peak hours, expressed as an integer between 0 and 23, inclusive.
+    <description>The start of off-peak hours, expressed as an integer between 0 and 24, inclusive.
       Set to -1 to disable off-peak.</description>
   </property>
   <property>
     <name>hbase.offpeak.end.hour</name>
     <value>-1</value>
-    <description>The end of off-peak hours, expressed as an integer between 0 and 23, inclusive. Set
+    <description>The end of off-peak hours, expressed as an integer between 0 and 24, exclusive. Set

Review comment:
       `    @Override
       public boolean isOffPeakHour(int targetHour) {
         if (startHour <= endHour) {
           return startHour <= targetHour && targetHour < endHour;
         }
         return targetHour < endHour || startHour <= targetHour;
       }`
   See the code, it will be "return 0 <= hour && hour < 24"
   




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org