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) git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1036302 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3dca408c49
commit
4a6d4ff453
|
@ -682,6 +682,10 @@ Release 0.90.0 - Unreleased
|
||||||
HBASE-3232 Fix KeyOnlyFilter + Add Value Length (Nicolas via Ryan)
|
HBASE-3232 Fix KeyOnlyFilter + Add Value Length (Nicolas via Ryan)
|
||||||
HBASE-3235 Intermittent incrementColumnValue failure in TestHRegion
|
HBASE-3235 Intermittent incrementColumnValue failure in TestHRegion
|
||||||
(Gary via Ryan)
|
(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
|
IMPROVEMENTS
|
||||||
|
|
|
@ -638,12 +638,13 @@ public class HLog implements Syncable {
|
||||||
// If too many log files, figure which regions we need to flush.
|
// If too many log files, figure which regions we need to flush.
|
||||||
// Array is an array of encoded region names.
|
// Array is an array of encoded region names.
|
||||||
byte [][] regions = null;
|
byte [][] regions = null;
|
||||||
int logCount = this.outputfiles.size() - logsToRemove;
|
int logCount = this.outputfiles.size();
|
||||||
if (logCount > this.maxLogs && this.outputfiles != null &&
|
if (logCount > this.maxLogs && this.outputfiles != null &&
|
||||||
this.outputfiles.size() > 0) {
|
this.outputfiles.size() > 0) {
|
||||||
// This is an array of encoded region names.
|
// This is an array of encoded region names.
|
||||||
regions = findMemstoresWithEditsEqualOrOlderThan(this.outputfiles.firstKey(),
|
regions = findMemstoresWithEditsEqualOrOlderThan(this.outputfiles.firstKey(),
|
||||||
this.lastSeqWritten);
|
this.lastSeqWritten);
|
||||||
|
if (regions != null) {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
for (int i = 0; i < regions.length; i++) {
|
for (int i = 0; i < regions.length; i++) {
|
||||||
if (i > 0) sb.append(", ");
|
if (i > 0) sb.append(", ");
|
||||||
|
@ -653,6 +654,7 @@ public class HLog implements Syncable {
|
||||||
this.maxLogs + "; forcing flush of " + regions.length + " regions(s): " +
|
this.maxLogs + "; forcing flush of " + regions.length + " regions(s): " +
|
||||||
sb.toString());
|
sb.toString());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return regions;
|
return regions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue