Skip to content

Commit

Permalink
HBASE-28332 Type conversion is no need in method CompactionChecker.ch…
Browse files Browse the repository at this point in the history
…ore() (#5653)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit addb4e7)
  • Loading branch information
guluo2016 authored and Apache9 committed Jan 26, 2024
1 parent a2fbb4d commit 810b4c8
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1992,13 +1992,12 @@ private static class CompactionChecker extends ScheduledChore {

@Override
protected void chore() {
for (Region r : this.instance.onlineRegions.values()) {
for (HRegion hr : this.instance.onlineRegions.values()) {
// If region is read only or compaction is disabled at table level, there's no need to
// iterate through region's stores
if (r == null || r.isReadOnly() || !r.getTableDescriptor().isCompactionEnabled()) {
if (hr == null || hr.isReadOnly() || !hr.getTableDescriptor().isCompactionEnabled()) {
continue;
}
HRegion hr = (HRegion) r;
for (HStore s : hr.stores.values()) {
try {
long multiplier = s.getCompactionCheckMultiplier();
Expand Down Expand Up @@ -2026,7 +2025,7 @@ protected void chore() {
}
}
} catch (IOException e) {
LOG.warn("Failed major compaction check on " + r, e);
LOG.warn("Failed major compaction check on " + hr, e);
}
}
}
Expand Down

0 comments on commit 810b4c8

Please sign in to comment.