Skip to content

Commit b5ac638

Browse files
committed
Revert "HBASE-26242 Allow split when store file count larger than the configed blocking file count (#3652)"
This reverts commit 2fa4bb0.
1 parent 2fa4bb0 commit b5ac638

File tree

3 files changed

+7
-169
lines changed

3 files changed

+7
-169
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplit.java

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,7 @@ public String dumpQueue() {
200200
}
201201

202202
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
206204
HRegion hr = (HRegion)r;
207205
try {
208206
if (shouldSplitRegion() && hr.getCompactPriority() >= PRIORITY_USER) {
@@ -220,14 +218,14 @@ public synchronized boolean requestSplit(final Region r) {
220218
return false;
221219
}
222220

223-
private synchronized void requestSplit(final Region r, byte[] midKey) {
221+
public synchronized void requestSplit(final Region r, byte[] midKey) {
224222
requestSplit(r, midKey, null);
225223
}
226224

227225
/*
228226
* The User parameter allows the split thread to assume the correct user identity
229227
*/
230-
private synchronized void requestSplit(final Region r, byte[] midKey, User user) {
228+
public synchronized void requestSplit(final Region r, byte[] midKey, User user) {
231229
if (midKey == null) {
232230
LOG.debug("Region " + r.getRegionInfo().getRegionNameAsString() +
233231
" not splittable because midkey=null");
@@ -489,9 +487,9 @@ public int getSplitQueueSize() {
489487
}
490488

491489
private boolean shouldSplitRegion() {
492-
if (server.getNumberOfOnlineRegions() > 0.9 * regionSplitLimit) {
490+
if(server.getNumberOfOnlineRegions() > 0.9*regionSplitLimit) {
493491
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");
495493
}
496494
return (regionSplitLimit > server.getNumberOfOnlineRegions());
497495
}
@@ -659,14 +657,11 @@ private void doCompaction(User user) {
659657
this + "; duration=" + StringUtils.formatTimeDiff(now, start));
660658
if (completed) {
661659
// degenerate case: blocked regions require recursive enqueues
662-
if (region.getCompactPriority() < Store.PRIORITY_USER
663-
&& store.getCompactPriority() <= 0) {
660+
if (store.getCompactPriority() <= 0) {
664661
requestSystemCompaction(region, store, "Recursive enqueue");
665662
} else {
666663
// 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);
670665
}
671666
}
672667
} catch (IOException ex) {

hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,6 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
267267
public static final String COMPACTION_AFTER_BULKLOAD_ENABLE =
268268
"hbase.compaction.after.bulkload.enable";
269269

270-
/** Config for allow split when file count greater than the configured blocking file count*/
271-
public static final String SPLIT_IGNORE_BLOCKING_ENABLED_KEY =
272-
"hbase.hregion.split.ignore.blocking.enabled";
273-
274270
/**
275271
* This is for for using HRegion as a local storage, where we may put the recovered edits in a
276272
* special place. Once this is set, we will only replay the recovered edits under this directory
@@ -8200,10 +8196,6 @@ public Optional<byte[]> checkSplit(boolean force) {
82008196
* @return The priority that this region should have in the compaction queue
82018197
*/
82028198
public int getCompactPriority() {
8203-
if (checkSplit().isPresent() && conf.getBoolean(SPLIT_IGNORE_BLOCKING_ENABLED_KEY, false)) {
8204-
// if a region should split, split it before compact
8205-
return Store.PRIORITY_USER;
8206-
}
82078199
return stores.values().stream().mapToInt(HStore::getCompactPriority).min()
82088200
.orElse(Store.NO_PRIORITY);
82098201
}

hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitWithBlockingFiles.java

Lines changed: 0 additions & 149 deletions
This file was deleted.

0 commit comments

Comments
 (0)