HBASE-18662 The default values for many configuration items in the code are not consistent with hbase-default.xml
Signed-off-by: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
parent
64fe24e687
commit
6035035707
|
@ -31,7 +31,7 @@ public class ConnectionConfiguration {
|
||||||
public static final String WRITE_BUFFER_SIZE_KEY = "hbase.client.write.buffer";
|
public static final String WRITE_BUFFER_SIZE_KEY = "hbase.client.write.buffer";
|
||||||
public static final long WRITE_BUFFER_SIZE_DEFAULT = 2097152;
|
public static final long WRITE_BUFFER_SIZE_DEFAULT = 2097152;
|
||||||
public static final String MAX_KEYVALUE_SIZE_KEY = "hbase.client.keyvalue.maxsize";
|
public static final String MAX_KEYVALUE_SIZE_KEY = "hbase.client.keyvalue.maxsize";
|
||||||
public static final int MAX_KEYVALUE_SIZE_DEFAULT = -1;
|
public static final int MAX_KEYVALUE_SIZE_DEFAULT = 10485760;
|
||||||
|
|
||||||
private final long writeBufferSize;
|
private final long writeBufferSize;
|
||||||
private final int metaOperationTimeout;
|
private final int metaOperationTimeout;
|
||||||
|
|
|
@ -229,7 +229,7 @@ public final class HConstants {
|
||||||
public static final String ZK_SESSION_TIMEOUT = "zookeeper.session.timeout";
|
public static final String ZK_SESSION_TIMEOUT = "zookeeper.session.timeout";
|
||||||
|
|
||||||
/** Default value for ZooKeeper session timeout */
|
/** Default value for ZooKeeper session timeout */
|
||||||
public static final int DEFAULT_ZK_SESSION_TIMEOUT = 180 * 1000;
|
public static final int DEFAULT_ZK_SESSION_TIMEOUT = 90 * 1000;
|
||||||
|
|
||||||
/** Parameter name for port region server listens on. */
|
/** Parameter name for port region server listens on. */
|
||||||
public static final String REGIONSERVER_PORT = "hbase.regionserver.port";
|
public static final String REGIONSERVER_PORT = "hbase.regionserver.port";
|
||||||
|
@ -719,7 +719,7 @@ public final class HConstants {
|
||||||
/**
|
/**
|
||||||
* Default value of {@link #HBASE_CLIENT_MAX_PERSERVER_TASKS}.
|
* Default value of {@link #HBASE_CLIENT_MAX_PERSERVER_TASKS}.
|
||||||
*/
|
*/
|
||||||
public static final int DEFAULT_HBASE_CLIENT_MAX_PERSERVER_TASKS = 2;
|
public static final int DEFAULT_HBASE_CLIENT_MAX_PERSERVER_TASKS = 5;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The maximum number of concurrent connections the client will maintain to a single
|
* The maximum number of concurrent connections the client will maintain to a single
|
||||||
|
@ -765,7 +765,7 @@ public final class HConstants {
|
||||||
/**
|
/**
|
||||||
* Default value of {@link #HBASE_CLIENT_RETRIES_NUMBER}.
|
* Default value of {@link #HBASE_CLIENT_RETRIES_NUMBER}.
|
||||||
*/
|
*/
|
||||||
public static final int DEFAULT_HBASE_CLIENT_RETRIES_NUMBER = 31;
|
public static final int DEFAULT_HBASE_CLIENT_RETRIES_NUMBER = 35;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameter name to set the default scanner caching for all clients.
|
* Parameter name to set the default scanner caching for all clients.
|
||||||
|
@ -1309,7 +1309,7 @@ public final class HConstants {
|
||||||
|
|
||||||
public static final String SNAPSHOT_RESTORE_TAKE_FAILSAFE_SNAPSHOT =
|
public static final String SNAPSHOT_RESTORE_TAKE_FAILSAFE_SNAPSHOT =
|
||||||
"hbase.snapshot.restore.take.failsafe.snapshot";
|
"hbase.snapshot.restore.take.failsafe.snapshot";
|
||||||
public static final boolean DEFAULT_SNAPSHOT_RESTORE_TAKE_FAILSAFE_SNAPSHOT = false;
|
public static final boolean DEFAULT_SNAPSHOT_RESTORE_TAKE_FAILSAFE_SNAPSHOT = true;
|
||||||
|
|
||||||
public static final String SNAPSHOT_RESTORE_FAILSAFE_NAME =
|
public static final String SNAPSHOT_RESTORE_FAILSAFE_NAME =
|
||||||
"hbase.snapshot.restore.failsafe.name";
|
"hbase.snapshot.restore.failsafe.name";
|
||||||
|
|
|
@ -323,7 +323,7 @@ possible configurations would overwhelm and obscure the important.
|
||||||
<description>
|
<description>
|
||||||
A split policy determines when a region should be split. The various other split policies that
|
A split policy determines when a region should be split. The various other split policies that
|
||||||
are available currently are BusyRegionSplitPolicy, ConstantSizeRegionSplitPolicy, DisabledRegionSplitPolicy,
|
are available currently are BusyRegionSplitPolicy, ConstantSizeRegionSplitPolicy, DisabledRegionSplitPolicy,
|
||||||
DelimitedKeyPrefixRegionSplitPolicy, and KeyPrefixRegionSplitPolicy.
|
DelimitedKeyPrefixRegionSplitPolicy, KeyPrefixRegionSplitPolicy, and SteppingSplitPolicy.
|
||||||
DisabledRegionSplitPolicy blocks manual region splitting.
|
DisabledRegionSplitPolicy blocks manual region splitting.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
|
|
|
@ -41,6 +41,7 @@ import org.apache.hadoop.hbase.HBaseConfiguration;
|
||||||
import org.apache.hadoop.hbase.HBaseInterfaceAudience;
|
import org.apache.hadoop.hbase.HBaseInterfaceAudience;
|
||||||
import org.apache.hadoop.hbase.http.InfoServer;
|
import org.apache.hadoop.hbase.http.InfoServer;
|
||||||
import org.apache.hadoop.hbase.rest.filter.AuthFilter;
|
import org.apache.hadoop.hbase.rest.filter.AuthFilter;
|
||||||
|
import org.apache.hadoop.hbase.rest.filter.GzipFilter;
|
||||||
import org.apache.hadoop.hbase.rest.filter.RestCsrfPreventionFilter;
|
import org.apache.hadoop.hbase.rest.filter.RestCsrfPreventionFilter;
|
||||||
import org.apache.hadoop.hbase.security.UserProvider;
|
import org.apache.hadoop.hbase.security.UserProvider;
|
||||||
import org.apache.hadoop.hbase.util.DNS;
|
import org.apache.hadoop.hbase.util.DNS;
|
||||||
|
@ -335,7 +336,7 @@ public class RESTServer implements Constants {
|
||||||
|
|
||||||
// Load filters from configuration.
|
// Load filters from configuration.
|
||||||
String[] filterClasses = servlet.getConfiguration().getStrings(FILTER_CLASSES,
|
String[] filterClasses = servlet.getConfiguration().getStrings(FILTER_CLASSES,
|
||||||
ArrayUtils.EMPTY_STRING_ARRAY);
|
GzipFilter.class.getName());
|
||||||
for (String filter : filterClasses) {
|
for (String filter : filterClasses) {
|
||||||
filter = filter.trim();
|
filter = filter.trim();
|
||||||
ctxHandler.addFilter(filter, PATH_SPEC_ANY, EnumSet.of(DispatcherType.REQUEST));
|
ctxHandler.addFilter(filter, PATH_SPEC_ANY, EnumSet.of(DispatcherType.REQUEST));
|
||||||
|
|
|
@ -513,10 +513,10 @@ public class HttpServer implements FilterContainer {
|
||||||
final String appDir = getWebAppsPath(b.name);
|
final String appDir = getWebAppsPath(b.name);
|
||||||
|
|
||||||
|
|
||||||
int maxThreads = b.conf.getInt(HTTP_MAX_THREADS, -1);
|
int maxThreads = b.conf.getInt(HTTP_MAX_THREADS, 16);
|
||||||
// If HTTP_MAX_THREADS is not configured, QueueThreadPool() will use the
|
// If HTTP_MAX_THREADS is less than or equal to 0, QueueThreadPool() will use the
|
||||||
// default value (currently 250).
|
// default value (currently 200).
|
||||||
QueuedThreadPool threadPool = maxThreads == -1 ? new QueuedThreadPool()
|
QueuedThreadPool threadPool = maxThreads <= 0 ? new QueuedThreadPool()
|
||||||
: new QueuedThreadPool(maxThreads);
|
: new QueuedThreadPool(maxThreads);
|
||||||
threadPool.setDaemon(true);
|
threadPool.setDaemon(true);
|
||||||
this.webServer = new Server(threadPool);
|
this.webServer = new Server(threadPool);
|
||||||
|
|
|
@ -112,7 +112,7 @@ public abstract class RpcExecutor {
|
||||||
this.conf = conf;
|
this.conf = conf;
|
||||||
this.abortable = abortable;
|
this.abortable = abortable;
|
||||||
|
|
||||||
float callQueuesHandlersFactor = this.conf.getFloat(CALL_QUEUE_HANDLER_FACTOR_CONF_KEY, 0);
|
float callQueuesHandlersFactor = this.conf.getFloat(CALL_QUEUE_HANDLER_FACTOR_CONF_KEY, 0.1f);
|
||||||
this.numCallQueues = computeNumCallQueues(handlerCount, callQueuesHandlersFactor);
|
this.numCallQueues = computeNumCallQueues(handlerCount, callQueuesHandlersFactor);
|
||||||
this.queues = new ArrayList<>(this.numCallQueues);
|
this.queues = new ArrayList<>(this.numCallQueues);
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class RegionNormalizerChore extends ScheduledChore {
|
||||||
|
|
||||||
public RegionNormalizerChore(HMaster master) {
|
public RegionNormalizerChore(HMaster master) {
|
||||||
super(master.getServerName() + "-RegionNormalizerChore", master,
|
super(master.getServerName() + "-RegionNormalizerChore", master,
|
||||||
master.getConfiguration().getInt("hbase.normalizer.period", 300000));
|
master.getConfiguration().getInt("hbase.normalizer.period", 1800000));
|
||||||
this.master = master;
|
this.master = master;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ public class HStore implements Store {
|
||||||
// keep in accordance with HDFS default storage policy
|
// keep in accordance with HDFS default storage policy
|
||||||
public static final String DEFAULT_BLOCK_STORAGE_POLICY = "HOT";
|
public static final String DEFAULT_BLOCK_STORAGE_POLICY = "HOT";
|
||||||
public static final int DEFAULT_COMPACTCHECKER_INTERVAL_MULTIPLIER = 1000;
|
public static final int DEFAULT_COMPACTCHECKER_INTERVAL_MULTIPLIER = 1000;
|
||||||
public static final int DEFAULT_BLOCKING_STOREFILE_COUNT = 7;
|
public static final int DEFAULT_BLOCKING_STOREFILE_COUNT = 10;
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(HStore.class);
|
private static final Log LOG = LogFactory.getLog(HStore.class);
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ import org.apache.hadoop.hbase.shaded.com.google.common.base.Preconditions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A split policy determines when a region should be split.
|
* A split policy determines when a region should be split.
|
||||||
|
* @see SteppingSplitPolicy Default split policy since 2.0.0
|
||||||
* @see IncreasingToUpperBoundRegionSplitPolicy Default split policy since
|
* @see IncreasingToUpperBoundRegionSplitPolicy Default split policy since
|
||||||
* 0.94.0
|
* 0.94.0
|
||||||
* @see ConstantSizeRegionSplitPolicy Default split policy before 0.94.0
|
* @see ConstantSizeRegionSplitPolicy Default split policy before 0.94.0
|
||||||
|
@ -40,7 +41,7 @@ import org.apache.hadoop.hbase.shaded.com.google.common.base.Preconditions;
|
||||||
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CONFIG)
|
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CONFIG)
|
||||||
public abstract class RegionSplitPolicy extends Configured {
|
public abstract class RegionSplitPolicy extends Configured {
|
||||||
private static final Class<? extends RegionSplitPolicy>
|
private static final Class<? extends RegionSplitPolicy>
|
||||||
DEFAULT_SPLIT_POLICY_CLASS = IncreasingToUpperBoundRegionSplitPolicy.class;
|
DEFAULT_SPLIT_POLICY_CLASS = SteppingSplitPolicy.class;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The region configured for this split policy.
|
* The region configured for this split policy.
|
||||||
|
|
|
@ -216,7 +216,7 @@ public class FSHLog extends AbstractFSWAL<Writer> {
|
||||||
FSUtils.getDefaultReplication(fs, this.walDir));
|
FSUtils.getDefaultReplication(fs, this.walDir));
|
||||||
this.lowReplicationRollLimit = conf.getInt("hbase.regionserver.hlog.lowreplication.rolllimit",
|
this.lowReplicationRollLimit = conf.getInt("hbase.regionserver.hlog.lowreplication.rolllimit",
|
||||||
5);
|
5);
|
||||||
this.closeErrorsTolerated = conf.getInt("hbase.regionserver.logroll.errors.tolerated", 0);
|
this.closeErrorsTolerated = conf.getInt("hbase.regionserver.logroll.errors.tolerated", 2);
|
||||||
|
|
||||||
// rollWriter sets this.hdfs_out if it can.
|
// rollWriter sets this.hdfs_out if it can.
|
||||||
rollWriter();
|
rollWriter();
|
||||||
|
|
|
@ -201,11 +201,11 @@ public class FSHDFSUtils extends FSUtils {
|
||||||
// This setting should be a little bit above what the cluster dfs heartbeat is set to.
|
// This setting should be a little bit above what the cluster dfs heartbeat is set to.
|
||||||
long firstPause = conf.getInt("hbase.lease.recovery.first.pause", 4000);
|
long firstPause = conf.getInt("hbase.lease.recovery.first.pause", 4000);
|
||||||
// This should be set to how long it'll take for us to timeout against primary datanode if it
|
// This should be set to how long it'll take for us to timeout against primary datanode if it
|
||||||
// is dead. We set it to 61 seconds, 1 second than the default READ_TIMEOUT in HDFS, the
|
// is dead. We set it to 64 seconds, 4 second than the default READ_TIMEOUT in HDFS, the
|
||||||
// default value for DFS_CLIENT_SOCKET_TIMEOUT_KEY. If recovery is still failing after this
|
// default value for DFS_CLIENT_SOCKET_TIMEOUT_KEY. If recovery is still failing after this
|
||||||
// timeout, then further recovery will take liner backoff with this base, to avoid endless
|
// timeout, then further recovery will take liner backoff with this base, to avoid endless
|
||||||
// preemptions when this value is not properly configured.
|
// preemptions when this value is not properly configured.
|
||||||
long subsequentPauseBase = conf.getLong("hbase.lease.recovery.dfs.timeout", 61 * 1000);
|
long subsequentPauseBase = conf.getLong("hbase.lease.recovery.dfs.timeout", 64 * 1000);
|
||||||
|
|
||||||
Method isFileClosedMeth = null;
|
Method isFileClosedMeth = null;
|
||||||
// whether we need to look for isFileClosed method
|
// whether we need to look for isFileClosed method
|
||||||
|
|
|
@ -461,11 +461,12 @@ The host name or IP address of the name server (DNS)
|
||||||
|
|
||||||
A split policy determines when a region should be split. The various other split policies that
|
A split policy determines when a region should be split. The various other split policies that
|
||||||
are available currently are ConstantSizeRegionSplitPolicy, DisabledRegionSplitPolicy,
|
are available currently are ConstantSizeRegionSplitPolicy, DisabledRegionSplitPolicy,
|
||||||
DelimitedKeyPrefixRegionSplitPolicy, KeyPrefixRegionSplitPolicy etc.
|
DelimitedKeyPrefixRegionSplitPolicy, KeyPrefixRegionSplitPolicy,
|
||||||
|
BusyRegionSplitPolicy, SteppingSplitPolicy etc.
|
||||||
|
|
||||||
+
|
+
|
||||||
.Default
|
.Default
|
||||||
`org.apache.hadoop.hbase.regionserver.IncreasingToUpperBoundRegionSplitPolicy`
|
`org.apache.hadoop.hbase.regionserver.SteppingSplitPolicy`
|
||||||
|
|
||||||
|
|
||||||
[[zookeeper.session.timeout]]
|
[[zookeeper.session.timeout]]
|
||||||
|
@ -2111,7 +2112,7 @@ Fully qualified name of class implementing coordinated state manager.
|
||||||
|
|
||||||
+
|
+
|
||||||
.Default
|
.Default
|
||||||
`10`
|
`16`
|
||||||
|
|
||||||
|
|
||||||
[[hbase.replication.rpc.codec]]
|
[[hbase.replication.rpc.codec]]
|
||||||
|
|
Loading…
Reference in New Issue