diff --git a/CHANGES.txt b/CHANGES.txt index 0ebeb4b17a4..30ec6c4c9f2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -682,6 +682,10 @@ Release 0.90.0 - Unreleased HBASE-3232 Fix KeyOnlyFilter + Add Value Length (Nicolas via Ryan) HBASE-3235 Intermittent incrementColumnValue failure in TestHRegion (Gary via Ryan) + HBASE-3241 check to see if we exceeded hbase.regionserver.maxlogs limit is + incorrect (Kannan Muthukkaruppan via JD) + HBASE-3239 Handle null regions to flush in HLog.cleanOldLogs (Kannan + Muthukkaruppan via JD) IMPROVEMENTS diff --git a/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java b/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java index bb0561ce89d..545c998f0b1 100644 --- a/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java +++ b/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java @@ -638,20 +638,22 @@ public class HLog implements Syncable { // If too many log files, figure which regions we need to flush. // Array is an array of encoded region names. byte [][] regions = null; - int logCount = this.outputfiles.size() - logsToRemove; + int logCount = this.outputfiles.size(); if (logCount > this.maxLogs && this.outputfiles != null && this.outputfiles.size() > 0) { // This is an array of encoded region names. regions = findMemstoresWithEditsEqualOrOlderThan(this.outputfiles.firstKey(), this.lastSeqWritten); - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < regions.length; i++) { - if (i > 0) sb.append(", "); - sb.append(Bytes.toStringBinary(regions[i])); + if (regions != null) { + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < regions.length; i++) { + if (i > 0) sb.append(", "); + sb.append(Bytes.toStringBinary(regions[i])); + } + LOG.info("Too many hlogs: logs=" + logCount + ", maxlogs=" + + this.maxLogs + "; forcing flush of " + regions.length + " regions(s): " + + sb.toString()); } - LOG.info("Too many hlogs: logs=" + logCount + ", maxlogs=" + - this.maxLogs + "; forcing flush of " + regions.length + " regions(s): " + - sb.toString()); } return regions; }