HBASE-3877 Determine Proper Defaults for Compaction ThreadPools
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1102105 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dedc82a653
commit
dc2659524a
|
@ -214,6 +214,7 @@ Release 0.91.0 - Unreleased
|
|||
(dhruba borthakur)
|
||||
HBASE-3797 StoreFile Level Compaction Locking
|
||||
HBASE-1476 Multithreaded Compactions
|
||||
HBASE-3877 Determine Proper Defaults for Compaction ThreadPools
|
||||
|
||||
TASKS
|
||||
HBASE-3559 Move report of split to master OFF the heartbeat channel
|
||||
|
|
|
@ -28,6 +28,8 @@ import java.util.concurrent.TimeUnit;
|
|||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.hbase.HConstants;
|
||||
import org.apache.hadoop.hbase.HTableDescriptor;
|
||||
import org.apache.hadoop.hbase.regionserver.compactions.CompactionRequest;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
|
@ -70,9 +72,19 @@ public class CompactSplitThread implements CompactionRequestor {
|
|||
int largeThreads = Math.max(1, conf.getInt(
|
||||
"hbase.regionserver.thread.compaction.large", 1));
|
||||
int smallThreads = conf.getInt(
|
||||
"hbase.regionserver.thread.compaction.small", 0);
|
||||
"hbase.regionserver.thread.compaction.small", 1);
|
||||
if (conf.get("hbase.regionserver.thread.compaction.throttle") != null) {
|
||||
throttleSize = conf.getLong(
|
||||
"hbase.regionserver.thread.compaction.throttle", 0);
|
||||
} else {
|
||||
// we have a complicated default. see HBASE-3877
|
||||
long flushSize = conf.getLong("hbase.hregion.memstore.flush.size",
|
||||
HTableDescriptor.DEFAULT_MEMSTORE_FLUSH_SIZE);
|
||||
long splitSize = conf.getLong("hbase.hregion.max.filesize",
|
||||
HConstants.DEFAULT_MAX_FILE_SIZE);
|
||||
throttleSize = Math.min(flushSize * 2, splitSize / 2);
|
||||
}
|
||||
|
||||
int splitThreads = conf.getInt("hbase.regionserver.thread.split", 1);
|
||||
|
||||
// if we have throttle threads, make sure the user also specified size
|
||||
|
|
Loading…
Reference in New Issue