Skip to content

Commit

Permalink
HBASE-24898 Can not set 23:00~24:00 as offpeak hour now
Browse files Browse the repository at this point in the history
  • Loading branch information
bsglz committed Aug 18, 2020
1 parent c81ef73 commit 1237cf9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions hbase-common/src/main/resources/hbase-default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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
to -1 to disable off-peak.</description>
</property>
<property>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static OffPeakHours getInstance(int startHour, int endHour) {
if (LOG.isWarnEnabled()) {
LOG.warn("Ignoring invalid start/end hour for peak hour : start = " +
startHour + " end = " + endHour +
". Valid numbers are [0-23]");
". Valid numbers are [0-24]");
}
return DISABLED;
}
Expand All @@ -63,7 +63,7 @@ public static OffPeakHours getInstance(int startHour, int endHour) {
}

private static boolean isValidHour(int hour) {
return 0 <= hour && hour <= 23;
return 0 <= hour && hour <= 24;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/main/asciidoc/_chapters/architecture.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2152,13 +2152,13 @@ For a full list of all configuration parameters available, see <<config.files,co
*Default*: `5.0F`
`hbase.offpeak.start.hour`::
The start of off-peak hours, expressed as an integer between 0 and 23, inclusive.
The start of off-peak hours, expressed as an integer between 0 and 24, inclusive.
Set to -1 to disable off-peak.
+
*Default*: `-1` (disabled)
`hbase.offpeak.end.hour`::
The end of off-peak hours, expressed as an integer between 0 and 23, inclusive.
The end of off-peak hours, expressed as an integer between 0 and 24, exclusive.
Set to -1 to disable off-peak.
+
*Default*: `-1` (disabled)
Expand Down

0 comments on commit 1237cf9

Please sign in to comment.