@@ -200,9 +200,7 @@ public String dumpQueue() {
200
200
}
201
201
202
202
public synchronized boolean requestSplit (final Region r ) {
203
- // Don't split regions that are blocking is the default behavior.
204
- // But in some circumstances, split here is needed to prevent the region size from
205
- // continuously growing, as well as the number of store files, see HBASE-26242.
203
+ // don't split regions that are blocking
206
204
HRegion hr = (HRegion )r ;
207
205
try {
208
206
if (shouldSplitRegion () && hr .getCompactPriority () >= PRIORITY_USER ) {
@@ -220,14 +218,14 @@ public synchronized boolean requestSplit(final Region r) {
220
218
return false ;
221
219
}
222
220
223
- private synchronized void requestSplit (final Region r , byte [] midKey ) {
221
+ public synchronized void requestSplit (final Region r , byte [] midKey ) {
224
222
requestSplit (r , midKey , null );
225
223
}
226
224
227
225
/*
228
226
* The User parameter allows the split thread to assume the correct user identity
229
227
*/
230
- private synchronized void requestSplit (final Region r , byte [] midKey , User user ) {
228
+ public synchronized void requestSplit (final Region r , byte [] midKey , User user ) {
231
229
if (midKey == null ) {
232
230
LOG .debug ("Region " + r .getRegionInfo ().getRegionNameAsString () +
233
231
" not splittable because midkey=null" );
@@ -489,9 +487,9 @@ public int getSplitQueueSize() {
489
487
}
490
488
491
489
private boolean shouldSplitRegion () {
492
- if (server .getNumberOfOnlineRegions () > 0.9 * regionSplitLimit ) {
490
+ if (server .getNumberOfOnlineRegions () > 0.9 * regionSplitLimit ) {
493
491
LOG .warn ("Total number of regions is approaching the upper limit " + regionSplitLimit + ". "
494
- + "Please consider taking a look at http://hbase.apache.org/book.html#ops.regionmgt" );
492
+ + "Please consider taking a look at http://hbase.apache.org/book.html#ops.regionmgt" );
495
493
}
496
494
return (regionSplitLimit > server .getNumberOfOnlineRegions ());
497
495
}
@@ -659,14 +657,11 @@ private void doCompaction(User user) {
659
657
this + "; duration=" + StringUtils .formatTimeDiff (now , start ));
660
658
if (completed ) {
661
659
// degenerate case: blocked regions require recursive enqueues
662
- if (region .getCompactPriority () < Store .PRIORITY_USER
663
- && store .getCompactPriority () <= 0 ) {
660
+ if (store .getCompactPriority () <= 0 ) {
664
661
requestSystemCompaction (region , store , "Recursive enqueue" );
665
662
} else {
666
663
// see if the compaction has caused us to exceed max region size
667
- if (!requestSplit (region ) && store .getCompactPriority () <= 0 ) {
668
- requestSystemCompaction (region , store , "Recursive enqueue" );
669
- }
664
+ requestSplit (region );
670
665
}
671
666
}
672
667
} catch (IOException ex ) {
0 commit comments