HBASE-511 Do exponential backoff in clients on NSRE, WRE, ISE, etc.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@680902 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0a9f7e62f6
commit
e4449cfc8f
|
@ -344,6 +344,7 @@ Release 0.2.0
|
||||||
Cryans via JimK)
|
Cryans via JimK)
|
||||||
HBASE-733 Enhance Cell so that it can contain multiple values at multiple
|
HBASE-733 Enhance Cell so that it can contain multiple values at multiple
|
||||||
timestamps
|
timestamps
|
||||||
|
HBASE-511 Do exponential backoff in clients on NSRE, WRE, ISE, etc.
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
HBASE-430 Performance: Scanners and getRow return maps with duplicate data
|
HBASE-430 Performance: Scanners and getRow return maps with duplicate data
|
||||||
|
|
|
@ -1,309 +1,309 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
|
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
|
||||||
<!--
|
<!--
|
||||||
/**
|
/**
|
||||||
* Copyright 2007 The Apache Software Foundation
|
* Copyright 2007 The Apache Software Foundation
|
||||||
*
|
*
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
* or more contributor license agreements. See the NOTICE file
|
* or more contributor license agreements. See the NOTICE file
|
||||||
* distributed with this work for additional information
|
* distributed with this work for additional information
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
* to you under the Apache License, Version 2.0 (the
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* "License"); you may not use this file except in compliance
|
* "License"); you may not use this file except in compliance
|
||||||
* with the License. You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
-->
|
-->
|
||||||
<configuration>
|
<configuration>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.master</name>
|
<name>hbase.master</name>
|
||||||
<value>local</value>
|
<value>local</value>
|
||||||
<description>The host and port that the HBase master runs at.
|
<description>The host and port that the HBase master runs at.
|
||||||
A value of 'local' runs the master and a regionserver in
|
A value of 'local' runs the master and a regionserver in
|
||||||
a single process.
|
a single process.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.rootdir</name>
|
<name>hbase.rootdir</name>
|
||||||
<value>file:///tmp/hbase-${user.name}/hbase</value>
|
<value>file:///tmp/hbase-${user.name}/hbase</value>
|
||||||
<description>The directory shared by region servers.
|
<description>The directory shared by region servers.
|
||||||
Should be fully-qualified to include the filesystem to use.
|
Should be fully-qualified to include the filesystem to use.
|
||||||
E.g: hdfs://NAMENODE_SERVER:PORT/HBASE_ROOTDIR
|
E.g: hdfs://NAMENODE_SERVER:PORT/HBASE_ROOTDIR
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.master.info.port</name>
|
<name>hbase.master.info.port</name>
|
||||||
<value>60010</value>
|
<value>60010</value>
|
||||||
<description>The port for the hbase master web UI
|
<description>The port for the hbase master web UI
|
||||||
Set to -1 if you do not want the info server to run.
|
Set to -1 if you do not want the info server to run.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.master.info.bindAddress</name>
|
<name>hbase.master.info.bindAddress</name>
|
||||||
<value>0.0.0.0</value>
|
<value>0.0.0.0</value>
|
||||||
<description>The address for the hbase master web UI
|
<description>The address for the hbase master web UI
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.regionserver</name>
|
<name>hbase.regionserver</name>
|
||||||
<value>0.0.0.0:60020</value>
|
<value>0.0.0.0:60020</value>
|
||||||
<description>The host and port a HBase region server runs at.
|
<description>The host and port a HBase region server runs at.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.regionserver.dns.interface</name>
|
<name>hbase.regionserver.dns.interface</name>
|
||||||
<value>default</value>
|
<value>default</value>
|
||||||
<description>Name of the network interface which a regionserver
|
<description>Name of the network interface which a regionserver
|
||||||
should use to determine it's "real" IP address. This lookup
|
should use to determine it's "real" IP address. This lookup
|
||||||
prevents strings like "localhost" and "127.0.0.1" from being
|
prevents strings like "localhost" and "127.0.0.1" from being
|
||||||
reported back to the master.
|
reported back to the master.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.regionserver.dns.interface</name>
|
<name>hbase.regionserver.dns.interface</name>
|
||||||
<value>default</value>
|
<value>default</value>
|
||||||
<description>Name of the network interface which a regionserver
|
<description>Name of the network interface which a regionserver
|
||||||
should use to determine it's "real" IP address. This lookup
|
should use to determine it's "real" IP address. This lookup
|
||||||
prevents strings like "localhost" and "127.0.0.1" from being
|
prevents strings like "localhost" and "127.0.0.1" from being
|
||||||
reported back to the master.
|
reported back to the master.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.regionserver.dns.interface</name>
|
<name>hbase.regionserver.dns.interface</name>
|
||||||
<value>default</value>
|
<value>default</value>
|
||||||
<description>Name of the network interface which a regionserver
|
<description>Name of the network interface which a regionserver
|
||||||
should use to determine it's "real" IP address. This lookup
|
should use to determine it's "real" IP address. This lookup
|
||||||
prevents strings like "localhost" and "127.0.0.1" from being
|
prevents strings like "localhost" and "127.0.0.1" from being
|
||||||
reported back to the master.
|
reported back to the master.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.regionserver.info.port</name>
|
<name>hbase.regionserver.info.port</name>
|
||||||
<value>60030</value>
|
<value>60030</value>
|
||||||
<description>The port for the hbase regionserver web UI
|
<description>The port for the hbase regionserver web UI
|
||||||
Set to -1 if you do not want the info server to run.
|
Set to -1 if you do not want the info server to run.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.regionserver.info.bindAddress</name>
|
<name>hbase.regionserver.info.bindAddress</name>
|
||||||
<value>0.0.0.0</value>
|
<value>0.0.0.0</value>
|
||||||
<description>The address for the hbase regionserver web UI
|
<description>The address for the hbase regionserver web UI
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.regionserver.class</name>
|
<name>hbase.regionserver.class</name>
|
||||||
<value>org.apache.hadoop.hbase.ipc.HRegionInterface</value>
|
<value>org.apache.hadoop.hbase.ipc.HRegionInterface</value>
|
||||||
<description>An interface that is assignable to HRegionInterface. Used in HClient for
|
<description>An interface that is assignable to HRegionInterface. Used in HClient for
|
||||||
opening proxy to remote region server.
|
opening proxy to remote region server.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.client.pause</name>
|
<name>hbase.client.pause</name>
|
||||||
<value>10000</value>
|
<value>10000</value>
|
||||||
<description>General client pause value. Used mostly as value to wait
|
<description>General client pause value. Used mostly as value to wait
|
||||||
before running a retry of a failed get, region lookup, etc.</description>
|
before running a retry of a failed get, region lookup, etc.</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.client.retries.number</name>
|
<name>hbase.client.retries.number</name>
|
||||||
<value>5</value>
|
<value>10</value>
|
||||||
<description>Maximum retries. Used as maximum for all retryable
|
<description>Maximum retries. Used as maximum for all retryable
|
||||||
operations such as fetching of the root region from root region
|
operations such as fetching of the root region from root region
|
||||||
server, getting a cell's value, starting a row update, etc.
|
server, getting a cell's value, starting a row update, etc.
|
||||||
Default: 5.
|
Default: 10.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.master.meta.thread.rescanfrequency</name>
|
<name>hbase.master.meta.thread.rescanfrequency</name>
|
||||||
<value>60000</value>
|
<value>60000</value>
|
||||||
<description>How long the HMaster sleeps (in milliseconds) between scans of
|
<description>How long the HMaster sleeps (in milliseconds) between scans of
|
||||||
the root and meta tables.
|
the root and meta tables.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.master.lease.period</name>
|
<name>hbase.master.lease.period</name>
|
||||||
<value>120000</value>
|
<value>120000</value>
|
||||||
<description>HMaster server lease period in milliseconds. Default is
|
<description>HMaster server lease period in milliseconds. Default is
|
||||||
60 seconds. Region servers must report in within this period else
|
60 seconds. Region servers must report in within this period else
|
||||||
they are considered dead. On loaded cluster, may need to up this
|
they are considered dead. On loaded cluster, may need to up this
|
||||||
period.</description>
|
period.</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.hbasemaster.maxregionopen</name>
|
<name>hbase.hbasemaster.maxregionopen</name>
|
||||||
<value>120000</value>
|
<value>120000</value>
|
||||||
<description>Period to wait for a region open. If regionserver
|
<description>Period to wait for a region open. If regionserver
|
||||||
takes longer than this interval, assign to a new regionserver.
|
takes longer than this interval, assign to a new regionserver.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.regionserver.lease.period</name>
|
<name>hbase.regionserver.lease.period</name>
|
||||||
<value>30000</value>
|
<value>30000</value>
|
||||||
<description>HRegion server lease period in milliseconds. Default is
|
<description>HRegion server lease period in milliseconds. Default is
|
||||||
30 seconds. Clients must report in within this period else they are
|
30 seconds. Clients must report in within this period else they are
|
||||||
considered dead.</description>
|
considered dead.</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.server.thread.wakefrequency</name>
|
<name>hbase.server.thread.wakefrequency</name>
|
||||||
<value>10000</value>
|
<value>10000</value>
|
||||||
<description>Time to sleep in between searches for work (in milliseconds).
|
<description>Time to sleep in between searches for work (in milliseconds).
|
||||||
Used as sleep interval by service threads such as META scanner and log roller.
|
Used as sleep interval by service threads such as META scanner and log roller.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.regionserver.handler.count</name>
|
<name>hbase.regionserver.handler.count</name>
|
||||||
<value>10</value>
|
<value>10</value>
|
||||||
<description>Count of RPC Server instances spun up on RegionServers
|
<description>Count of RPC Server instances spun up on RegionServers
|
||||||
Same property is used by the HMaster for count of master handlers.
|
Same property is used by the HMaster for count of master handlers.
|
||||||
Default is 10.
|
Default is 10.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.regionserver.msginterval</name>
|
<name>hbase.regionserver.msginterval</name>
|
||||||
<value>3000</value>
|
<value>3000</value>
|
||||||
<description>Interval between messages from the RegionServer to HMaster
|
<description>Interval between messages from the RegionServer to HMaster
|
||||||
in milliseconds. Default is 15. Set this value low if you want unit
|
in milliseconds. Default is 15. Set this value low if you want unit
|
||||||
tests to be responsive.
|
tests to be responsive.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.regionserver.maxlogentries</name>
|
<name>hbase.regionserver.maxlogentries</name>
|
||||||
<value>30000</value>
|
<value>30000</value>
|
||||||
<description>Rotate the HRegion HLogs when count of entries exceeds this
|
<description>Rotate the HRegion HLogs when count of entries exceeds this
|
||||||
value. Default: 30,000. Value is checked by a thread that runs every
|
value. Default: 30,000. Value is checked by a thread that runs every
|
||||||
hbase.server.thread.wakefrequency.
|
hbase.server.thread.wakefrequency.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.regionserver.optionalcacheflushinterval</name>
|
<name>hbase.regionserver.optionalcacheflushinterval</name>
|
||||||
<value>1800000</value>
|
<value>1800000</value>
|
||||||
<description>
|
<description>
|
||||||
Amount of time to wait since the last time a region was flushed before
|
Amount of time to wait since the last time a region was flushed before
|
||||||
invoking an optional cache flush (An optional cache flush is a
|
invoking an optional cache flush (An optional cache flush is a
|
||||||
flush even though memcache is not at the memcache.flush.size).
|
flush even though memcache is not at the memcache.flush.size).
|
||||||
Default: 30 minutes (in miliseconds)
|
Default: 30 minutes (in miliseconds)
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.regionserver.optionallogrollinterval</name>
|
<name>hbase.regionserver.optionallogrollinterval</name>
|
||||||
<value>1800000</value>
|
<value>1800000</value>
|
||||||
<description>
|
<description>
|
||||||
Amount of time to wait since the last time a the region server's log was
|
Amount of time to wait since the last time a the region server's log was
|
||||||
rolled before invoking an optional log roll (An optional log roll is a
|
rolled before invoking an optional log roll (An optional log roll is a
|
||||||
one in which the log does not contain hbase.regionserver.maxlogentries).
|
one in which the log does not contain hbase.regionserver.maxlogentries).
|
||||||
Default: 30 minutes (in miliseconds)
|
Default: 30 minutes (in miliseconds)
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.hregion.memcache.flush.size</name>
|
<name>hbase.hregion.memcache.flush.size</name>
|
||||||
<value>67108864</value>
|
<value>67108864</value>
|
||||||
<description>
|
<description>
|
||||||
A HRegion memcache will be flushed to disk if size of the memcache
|
A HRegion memcache will be flushed to disk if size of the memcache
|
||||||
exceeds this number of bytes. Value is checked by a thread that runs
|
exceeds this number of bytes. Value is checked by a thread that runs
|
||||||
every hbase.server.thread.wakefrequency.
|
every hbase.server.thread.wakefrequency.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.hregion.memcache.block.multiplier</name>
|
<name>hbase.hregion.memcache.block.multiplier</name>
|
||||||
<value>2</value>
|
<value>2</value>
|
||||||
<description>
|
<description>
|
||||||
Block updates if memcache has hbase.hregion.block.memcache
|
Block updates if memcache has hbase.hregion.block.memcache
|
||||||
time hbase.hregion.flush.size bytes. Useful preventing
|
time hbase.hregion.flush.size bytes. Useful preventing
|
||||||
runaway memcache during spikes in update traffic. Without an
|
runaway memcache during spikes in update traffic. Without an
|
||||||
upper-bound, memcache fills such that when it flushes the
|
upper-bound, memcache fills such that when it flushes the
|
||||||
resultant flush files take a long time to compact or split, or
|
resultant flush files take a long time to compact or split, or
|
||||||
worse, we OOME.
|
worse, we OOME.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.hregion.max.filesize</name>
|
<name>hbase.hregion.max.filesize</name>
|
||||||
<value>268435456</value>
|
<value>268435456</value>
|
||||||
<description>
|
<description>
|
||||||
Maximum HStoreFile size. If any one of a column families' HStoreFiles has
|
Maximum HStoreFile size. If any one of a column families' HStoreFiles has
|
||||||
grown to exceed this value, the hosting HRegion is split in two.
|
grown to exceed this value, the hosting HRegion is split in two.
|
||||||
Default: 256M.
|
Default: 256M.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.hstore.compactionThreshold</name>
|
<name>hbase.hstore.compactionThreshold</name>
|
||||||
<value>3</value>
|
<value>3</value>
|
||||||
<description>
|
<description>
|
||||||
If more than this number of HStoreFiles in any one HStore
|
If more than this number of HStoreFiles in any one HStore
|
||||||
(one HStoreFile is written per flush of memcache) then a compaction
|
(one HStoreFile is written per flush of memcache) then a compaction
|
||||||
is run to rewrite all HStoreFiles files as one. Larger numbers
|
is run to rewrite all HStoreFiles files as one. Larger numbers
|
||||||
put off compaction but when it runs, it takes longer to complete.
|
put off compaction but when it runs, it takes longer to complete.
|
||||||
During a compaction, updates cannot be flushed to disk. Long
|
During a compaction, updates cannot be flushed to disk. Long
|
||||||
compactions require memory sufficient to carry the logging of
|
compactions require memory sufficient to carry the logging of
|
||||||
all updates across the duration of the compaction.
|
all updates across the duration of the compaction.
|
||||||
|
|
||||||
If too large, clients timeout during compaction.
|
If too large, clients timeout during compaction.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.regionserver.thread.splitcompactcheckfrequency</name>
|
<name>hbase.regionserver.thread.splitcompactcheckfrequency</name>
|
||||||
<value>20000</value>
|
<value>20000</value>
|
||||||
<description>How often a region server runs the split/compaction check.
|
<description>How often a region server runs the split/compaction check.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.regionserver.nbreservationblocks</name>
|
<name>hbase.regionserver.nbreservationblocks</name>
|
||||||
<value>4</value>
|
<value>4</value>
|
||||||
<description>The number of reservation blocks which are used to prevent
|
<description>The number of reservation blocks which are used to prevent
|
||||||
unstable region servers caused by an OOME.
|
unstable region servers caused by an OOME.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.io.index.interval</name>
|
<name>hbase.io.index.interval</name>
|
||||||
<value>32</value>
|
<value>32</value>
|
||||||
<description>The interval at which we record offsets in hbase
|
<description>The interval at which we record offsets in hbase
|
||||||
store files/mapfiles. Default for stock mapfiles is 128. Index
|
store files/mapfiles. Default for stock mapfiles is 128. Index
|
||||||
files are read into memory. If there are many of them, could prove
|
files are read into memory. If there are many of them, could prove
|
||||||
a burden. If so play with the hadoop io.map.index.skip property and
|
a burden. If so play with the hadoop io.map.index.skip property and
|
||||||
skip every nth index member when reading back the index into memory.
|
skip every nth index member when reading back the index into memory.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.io.seqfile.compression.type</name>
|
<name>hbase.io.seqfile.compression.type</name>
|
||||||
<value>NONE</value>
|
<value>NONE</value>
|
||||||
<description>The compression type for hbase sequencefile.Writers
|
<description>The compression type for hbase sequencefile.Writers
|
||||||
such as hlog.
|
such as hlog.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.hstore.blockCache.blockSize</name>
|
<name>hbase.hstore.blockCache.blockSize</name>
|
||||||
<value>65536</value>
|
<value>65536</value>
|
||||||
<description>The size of each block in any block caches.
|
<description>The size of each block in any block caches.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
<!-- HbaseShell Configurations -->
|
<!-- HbaseShell Configurations -->
|
||||||
<property>
|
<property>
|
||||||
<name>hbaseshell.jline.bell.enabled</name>
|
<name>hbaseshell.jline.bell.enabled</name>
|
||||||
<value>true</value>
|
<value>true</value>
|
||||||
<description>
|
<description>
|
||||||
if true, enable audible keyboard bells if an alert is required.
|
if true, enable audible keyboard bells if an alert is required.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.regionserver.globalMemcacheLimit</name>
|
<name>hbase.regionserver.globalMemcacheLimit</name>
|
||||||
<value>536870912</value>
|
<value>536870912</value>
|
||||||
<description>Maximum size of all memcaches in a region server before new
|
<description>Maximum size of all memcaches in a region server before new
|
||||||
updates are blocked and flushes are forced. Defaults to 512MB.
|
updates are blocked and flushes are forced. Defaults to 512MB.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
<property>
|
||||||
<name>hbase.regionserver.globalMemcacheLimitlowMark</name>
|
<name>hbase.regionserver.globalMemcacheLimitlowMark</name>
|
||||||
<value>256435456</value>
|
<value>256435456</value>
|
||||||
<description>When memcaches are being forced to flush to make room in
|
<description>When memcaches are being forced to flush to make room in
|
||||||
memory, keep flushing until we hit this mark. Defaults to 256MB. Setting
|
memory, keep flushing until we hit this mark. Defaults to 256MB. Setting
|
||||||
this value equal to hbase.regionserver.globalmemcachelimit causes the
|
this value equal to hbase.regionserver.globalmemcachelimit causes the
|
||||||
minimum possible flushing to occur when updates are blocked due to
|
minimum possible flushing to occur when updates are blocked due to
|
||||||
memcache limiting.
|
memcache limiting.
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
@ -1,229 +1,235 @@
|
||||||
/**
|
/**
|
||||||
* Copyright 2007 The Apache Software Foundation
|
* Copyright 2007 The Apache Software Foundation
|
||||||
*
|
*
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
* or more contributor license agreements. See the NOTICE file
|
* or more contributor license agreements. See the NOTICE file
|
||||||
* distributed with this work for additional information
|
* distributed with this work for additional information
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
* to you under the Apache License, Version 2.0 (the
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* "License"); you may not use this file except in compliance
|
* "License"); you may not use this file except in compliance
|
||||||
* with the License. You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.hadoop.hbase;
|
package org.apache.hadoop.hbase;
|
||||||
|
|
||||||
import org.apache.hadoop.hbase.ipc.HRegionInterface;
|
import org.apache.hadoop.hbase.ipc.HRegionInterface;
|
||||||
import org.apache.hadoop.hbase.util.Bytes;
|
import org.apache.hadoop.hbase.util.Bytes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HConstants holds a bunch of HBase-related constants
|
* HConstants holds a bunch of HBase-related constants
|
||||||
*/
|
*/
|
||||||
public interface HConstants {
|
public interface HConstants {
|
||||||
|
|
||||||
/** long constant for zero */
|
/** long constant for zero */
|
||||||
static final Long ZERO_L = Long.valueOf(0L);
|
static final Long ZERO_L = Long.valueOf(0L);
|
||||||
|
|
||||||
static final String NINES = "99999999999999";
|
static final String NINES = "99999999999999";
|
||||||
static final String ZEROES = "00000000000000";
|
static final String ZEROES = "00000000000000";
|
||||||
|
|
||||||
// For migration
|
// For migration
|
||||||
|
|
||||||
/** name of version file */
|
/** name of version file */
|
||||||
static final String VERSION_FILE_NAME = "hbase.version";
|
static final String VERSION_FILE_NAME = "hbase.version";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Current version of file system
|
* Current version of file system
|
||||||
* Version 4 supports only one kind of bloom filter
|
* Version 4 supports only one kind of bloom filter
|
||||||
*/
|
*/
|
||||||
public static final String FILE_SYSTEM_VERSION = "4";
|
public static final String FILE_SYSTEM_VERSION = "4";
|
||||||
|
|
||||||
// Configuration parameters
|
// Configuration parameters
|
||||||
|
|
||||||
// TODO: URL for hbase master like hdfs URLs with host and port.
|
// TODO: URL for hbase master like hdfs URLs with host and port.
|
||||||
// Like jdbc URLs? URLs could be used to refer to table cells?
|
// Like jdbc URLs? URLs could be used to refer to table cells?
|
||||||
// jdbc:mysql://[host][,failoverhost...][:port]/[database]
|
// jdbc:mysql://[host][,failoverhost...][:port]/[database]
|
||||||
// jdbc:mysql://[host][,failoverhost...][:port]/[database][?propertyName1][=propertyValue1][&propertyName2][=propertyValue2]...
|
// jdbc:mysql://[host][,failoverhost...][:port]/[database][?propertyName1][=propertyValue1][&propertyName2][=propertyValue2]...
|
||||||
|
|
||||||
// Key into HBaseConfiguration for the hbase.master address.
|
// Key into HBaseConfiguration for the hbase.master address.
|
||||||
// TODO: Support 'local': i.e. default of all running in single
|
// TODO: Support 'local': i.e. default of all running in single
|
||||||
// process. Same for regionserver. TODO: Is having HBase homed
|
// process. Same for regionserver. TODO: Is having HBase homed
|
||||||
// on port 60k OK?
|
// on port 60k OK?
|
||||||
|
|
||||||
/** Parameter name for master address */
|
/** Parameter name for master address */
|
||||||
static final String MASTER_ADDRESS = "hbase.master";
|
static final String MASTER_ADDRESS = "hbase.master";
|
||||||
|
|
||||||
/** default host address */
|
/** default host address */
|
||||||
static final String DEFAULT_HOST = "0.0.0.0";
|
static final String DEFAULT_HOST = "0.0.0.0";
|
||||||
|
|
||||||
/** default port that the master listens on */
|
/** default port that the master listens on */
|
||||||
static final int DEFAULT_MASTER_PORT = 60000;
|
static final int DEFAULT_MASTER_PORT = 60000;
|
||||||
|
|
||||||
/** Default master address */
|
/** Default master address */
|
||||||
static final String DEFAULT_MASTER_ADDRESS = DEFAULT_HOST + ":" +
|
static final String DEFAULT_MASTER_ADDRESS = DEFAULT_HOST + ":" +
|
||||||
DEFAULT_MASTER_PORT;
|
DEFAULT_MASTER_PORT;
|
||||||
|
|
||||||
/** default port for master web api */
|
/** default port for master web api */
|
||||||
static final int DEFAULT_MASTER_INFOPORT = 60010;
|
static final int DEFAULT_MASTER_INFOPORT = 60010;
|
||||||
|
|
||||||
/** Parameter name for hbase.regionserver address. */
|
/** Parameter name for hbase.regionserver address. */
|
||||||
static final String REGIONSERVER_ADDRESS = "hbase.regionserver";
|
static final String REGIONSERVER_ADDRESS = "hbase.regionserver";
|
||||||
|
|
||||||
/** Default region server address */
|
/** Default region server address */
|
||||||
static final String DEFAULT_REGIONSERVER_ADDRESS = DEFAULT_HOST + ":60020";
|
static final String DEFAULT_REGIONSERVER_ADDRESS = DEFAULT_HOST + ":60020";
|
||||||
|
|
||||||
/** default port for region server web api */
|
/** default port for region server web api */
|
||||||
static final int DEFAULT_REGIONSERVER_INFOPORT = 60030;
|
static final int DEFAULT_REGIONSERVER_INFOPORT = 60030;
|
||||||
|
|
||||||
/** Parameter name for what region server interface to use. */
|
/** Parameter name for what region server interface to use. */
|
||||||
static final String REGION_SERVER_CLASS = "hbase.regionserver.class";
|
static final String REGION_SERVER_CLASS = "hbase.regionserver.class";
|
||||||
|
|
||||||
/** Parameter name for what region server implementation to use. */
|
/** Parameter name for what region server implementation to use. */
|
||||||
static final String REGION_SERVER_IMPL= "hbase.regionserver.impl";
|
static final String REGION_SERVER_IMPL= "hbase.regionserver.impl";
|
||||||
|
|
||||||
/** Default region server interface class name. */
|
/** Default region server interface class name. */
|
||||||
static final String DEFAULT_REGION_SERVER_CLASS = HRegionInterface.class.getName();
|
static final String DEFAULT_REGION_SERVER_CLASS = HRegionInterface.class.getName();
|
||||||
|
|
||||||
/** Parameter name for how often threads should wake up */
|
/** Parameter name for how often threads should wake up */
|
||||||
static final String THREAD_WAKE_FREQUENCY = "hbase.server.thread.wakefrequency";
|
static final String THREAD_WAKE_FREQUENCY = "hbase.server.thread.wakefrequency";
|
||||||
|
|
||||||
/** Parameter name for HBase instance root directory */
|
/** Parameter name for HBase instance root directory */
|
||||||
static final String HBASE_DIR = "hbase.rootdir";
|
static final String HBASE_DIR = "hbase.rootdir";
|
||||||
|
|
||||||
/** Used to construct the name of the log directory for a region server */
|
/** Used to construct the name of the log directory for a region server */
|
||||||
static final String HREGION_LOGDIR_NAME = "log";
|
static final String HREGION_LOGDIR_NAME = "log";
|
||||||
|
|
||||||
/** Name of old log file for reconstruction */
|
/** Name of old log file for reconstruction */
|
||||||
static final String HREGION_OLDLOGFILE_NAME = "oldlogfile.log";
|
static final String HREGION_OLDLOGFILE_NAME = "oldlogfile.log";
|
||||||
|
|
||||||
/** Default maximum file size */
|
/** Default maximum file size */
|
||||||
static final long DEFAULT_MAX_FILE_SIZE = 256 * 1024 * 1024;
|
static final long DEFAULT_MAX_FILE_SIZE = 256 * 1024 * 1024;
|
||||||
|
|
||||||
/** Default size of a reservation block */
|
/** Default size of a reservation block */
|
||||||
static final int DEFAULT_SIZE_RESERVATION_BLOCK = 1024 * 1024 * 5;
|
static final int DEFAULT_SIZE_RESERVATION_BLOCK = 1024 * 1024 * 5;
|
||||||
|
|
||||||
// Always store the location of the root table's HRegion.
|
// Always store the location of the root table's HRegion.
|
||||||
// This HRegion is never split.
|
// This HRegion is never split.
|
||||||
|
|
||||||
// region name = table + startkey + regionid. This is the row key.
|
// region name = table + startkey + regionid. This is the row key.
|
||||||
// each row in the root and meta tables describes exactly 1 region
|
// each row in the root and meta tables describes exactly 1 region
|
||||||
// Do we ever need to know all the information that we are storing?
|
// Do we ever need to know all the information that we are storing?
|
||||||
|
|
||||||
// Note that the name of the root table starts with "-" and the name of the
|
// Note that the name of the root table starts with "-" and the name of the
|
||||||
// meta table starts with "." Why? it's a trick. It turns out that when we
|
// meta table starts with "." Why? it's a trick. It turns out that when we
|
||||||
// store region names in memory, we use a SortedMap. Since "-" sorts before
|
// store region names in memory, we use a SortedMap. Since "-" sorts before
|
||||||
// "." (and since no other table name can start with either of these
|
// "." (and since no other table name can start with either of these
|
||||||
// characters, the root region will always be the first entry in such a Map,
|
// characters, the root region will always be the first entry in such a Map,
|
||||||
// followed by all the meta regions (which will be ordered by their starting
|
// followed by all the meta regions (which will be ordered by their starting
|
||||||
// row key as well), followed by all user tables. So when the Master is
|
// row key as well), followed by all user tables. So when the Master is
|
||||||
// choosing regions to assign, it will always choose the root region first,
|
// choosing regions to assign, it will always choose the root region first,
|
||||||
// followed by the meta regions, followed by user regions. Since the root
|
// followed by the meta regions, followed by user regions. Since the root
|
||||||
// and meta regions always need to be on-line, this ensures that they will
|
// and meta regions always need to be on-line, this ensures that they will
|
||||||
// be the first to be reassigned if the server(s) they are being served by
|
// be the first to be reassigned if the server(s) they are being served by
|
||||||
// should go down.
|
// should go down.
|
||||||
|
|
||||||
/** The root table's name.*/
|
/** The root table's name.*/
|
||||||
static final byte [] ROOT_TABLE_NAME = Bytes.toBytes("-ROOT-");
|
static final byte [] ROOT_TABLE_NAME = Bytes.toBytes("-ROOT-");
|
||||||
|
|
||||||
/** The META table's name. */
|
/** The META table's name. */
|
||||||
static final byte [] META_TABLE_NAME = Bytes.toBytes(".META.");
|
static final byte [] META_TABLE_NAME = Bytes.toBytes(".META.");
|
||||||
|
|
||||||
// Defines for the column names used in both ROOT and META HBase 'meta' tables.
|
// Defines for the column names used in both ROOT and META HBase 'meta' tables.
|
||||||
|
|
||||||
/** The ROOT and META column family (string) */
|
/** The ROOT and META column family (string) */
|
||||||
static final String COLUMN_FAMILY_STR = "info:";
|
static final String COLUMN_FAMILY_STR = "info:";
|
||||||
|
|
||||||
/** The META historian column family (string) */
|
/** The META historian column family (string) */
|
||||||
static final String COLUMN_FAMILY_HISTORIAN_STR = "historian:";
|
static final String COLUMN_FAMILY_HISTORIAN_STR = "historian:";
|
||||||
|
|
||||||
/** The ROOT and META column family */
|
/** The ROOT and META column family */
|
||||||
static final byte [] COLUMN_FAMILY = Bytes.toBytes(COLUMN_FAMILY_STR);
|
static final byte [] COLUMN_FAMILY = Bytes.toBytes(COLUMN_FAMILY_STR);
|
||||||
|
|
||||||
/** The META historian column family */
|
/** The META historian column family */
|
||||||
static final byte [] COLUMN_FAMILY_HISTORIAN = Bytes.toBytes(COLUMN_FAMILY_HISTORIAN_STR);
|
static final byte [] COLUMN_FAMILY_HISTORIAN = Bytes.toBytes(COLUMN_FAMILY_HISTORIAN_STR);
|
||||||
|
|
||||||
/** Array of meta column names */
|
/** Array of meta column names */
|
||||||
static final byte[][] COLUMN_FAMILY_ARRAY = new byte[][] {COLUMN_FAMILY};
|
static final byte[][] COLUMN_FAMILY_ARRAY = new byte[][] {COLUMN_FAMILY};
|
||||||
|
|
||||||
/** ROOT/META column family member - contains HRegionInfo */
|
/** ROOT/META column family member - contains HRegionInfo */
|
||||||
static final byte [] COL_REGIONINFO =
|
static final byte [] COL_REGIONINFO =
|
||||||
Bytes.toBytes(COLUMN_FAMILY_STR + "regioninfo");
|
Bytes.toBytes(COLUMN_FAMILY_STR + "regioninfo");
|
||||||
|
|
||||||
/** Array of column - contains HRegionInfo */
|
/** Array of column - contains HRegionInfo */
|
||||||
static final byte[][] COL_REGIONINFO_ARRAY = new byte[][] {COL_REGIONINFO};
|
static final byte[][] COL_REGIONINFO_ARRAY = new byte[][] {COL_REGIONINFO};
|
||||||
|
|
||||||
/** ROOT/META column family member - contains HServerAddress.toString() */
|
/** ROOT/META column family member - contains HServerAddress.toString() */
|
||||||
static final byte[] COL_SERVER = Bytes.toBytes(COLUMN_FAMILY_STR + "server");
|
static final byte[] COL_SERVER = Bytes.toBytes(COLUMN_FAMILY_STR + "server");
|
||||||
|
|
||||||
/** ROOT/META column family member - contains server start code (a long) */
|
/** ROOT/META column family member - contains server start code (a long) */
|
||||||
static final byte [] COL_STARTCODE =
|
static final byte [] COL_STARTCODE =
|
||||||
Bytes.toBytes(COLUMN_FAMILY_STR + "serverstartcode");
|
Bytes.toBytes(COLUMN_FAMILY_STR + "serverstartcode");
|
||||||
|
|
||||||
/** the lower half of a split region */
|
/** the lower half of a split region */
|
||||||
static final byte [] COL_SPLITA = Bytes.toBytes(COLUMN_FAMILY_STR + "splitA");
|
static final byte [] COL_SPLITA = Bytes.toBytes(COLUMN_FAMILY_STR + "splitA");
|
||||||
|
|
||||||
/** the upper half of a split region */
|
/** the upper half of a split region */
|
||||||
static final byte [] COL_SPLITB = Bytes.toBytes(COLUMN_FAMILY_STR + "splitB");
|
static final byte [] COL_SPLITB = Bytes.toBytes(COLUMN_FAMILY_STR + "splitB");
|
||||||
|
|
||||||
/** All the columns in the catalog -ROOT- and .META. tables.
|
/** All the columns in the catalog -ROOT- and .META. tables.
|
||||||
*/
|
*/
|
||||||
static final byte[][] ALL_META_COLUMNS = {COL_REGIONINFO, COL_SERVER,
|
static final byte[][] ALL_META_COLUMNS = {COL_REGIONINFO, COL_SERVER,
|
||||||
COL_STARTCODE, COL_SPLITA, COL_SPLITB};
|
COL_STARTCODE, COL_SPLITA, COL_SPLITB};
|
||||||
|
|
||||||
// Other constants
|
// Other constants
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An empty instance.
|
* An empty instance.
|
||||||
*/
|
*/
|
||||||
static final byte [] EMPTY_BYTE_ARRAY = new byte [0];
|
static final byte [] EMPTY_BYTE_ARRAY = new byte [0];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used by scanners, etc when they want to start at the beginning of a region
|
* Used by scanners, etc when they want to start at the beginning of a region
|
||||||
*/
|
*/
|
||||||
static final byte [] EMPTY_START_ROW = EMPTY_BYTE_ARRAY;
|
static final byte [] EMPTY_START_ROW = EMPTY_BYTE_ARRAY;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Last row in a table.
|
* Last row in a table.
|
||||||
*/
|
*/
|
||||||
static final byte [] EMPTY_END_ROW = EMPTY_START_ROW;
|
static final byte [] EMPTY_END_ROW = EMPTY_START_ROW;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used by scanners and others when they're trying to detect the end of a
|
* Used by scanners and others when they're trying to detect the end of a
|
||||||
* table
|
* table
|
||||||
*/
|
*/
|
||||||
static final byte [] LAST_ROW = EMPTY_BYTE_ARRAY;
|
static final byte [] LAST_ROW = EMPTY_BYTE_ARRAY;
|
||||||
|
|
||||||
/** When we encode strings, we always specify UTF8 encoding */
|
/** When we encode strings, we always specify UTF8 encoding */
|
||||||
static final String UTF8_ENCODING = "UTF-8";
|
static final String UTF8_ENCODING = "UTF-8";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Timestamp to use when we want to refer to the latest cell.
|
* Timestamp to use when we want to refer to the latest cell.
|
||||||
* This is the timestamp sent by clients when no timestamp is specified on
|
* This is the timestamp sent by clients when no timestamp is specified on
|
||||||
* commit.
|
* commit.
|
||||||
*/
|
*/
|
||||||
static final long LATEST_TIMESTAMP = Long.MAX_VALUE;
|
static final long LATEST_TIMESTAMP = Long.MAX_VALUE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define for 'return-all-versions'.
|
* Define for 'return-all-versions'.
|
||||||
*/
|
*/
|
||||||
static final int ALL_VERSIONS = Integer.MAX_VALUE;
|
static final int ALL_VERSIONS = Integer.MAX_VALUE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unlimited time-to-live.
|
* Unlimited time-to-live.
|
||||||
*/
|
*/
|
||||||
static final int FOREVER = -1;
|
static final int FOREVER = -1;
|
||||||
|
|
||||||
public static final String HBASE_CLIENT_RETRIES_NUMBER_KEY =
|
public static final String HBASE_CLIENT_RETRIES_NUMBER_KEY =
|
||||||
"hbase.client.retries.number";
|
"hbase.client.retries.number";
|
||||||
public static final int DEFAULT_CLIENT_RETRIES = 5;
|
public static final int DEFAULT_CLIENT_RETRIES = 5;
|
||||||
|
|
||||||
public static final String NAME = "NAME";
|
public static final String NAME = "NAME";
|
||||||
public static final String VERSIONS = "VERSIONS";
|
public static final String VERSIONS = "VERSIONS";
|
||||||
public static final String IN_MEMORY = "IN_MEMORY";
|
public static final String IN_MEMORY = "IN_MEMORY";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a retry backoff multiplier table similar to the BSD TCP syn
|
||||||
|
* backoff table, a bit more aggressive than simple exponential backoff.
|
||||||
|
*/
|
||||||
|
public static int RETRY_BACKOFF[] = { 1, 1, 1, 1, 2, 4, 8, 16, 32, 64 };
|
||||||
}
|
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue