You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by jd...@apache.org on 2013/08/08 01:15:19 UTC
svn commit: r1511530 - in /hbase/trunk:
hbase-common/src/main/resources/hbase-default.xml
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
src/main/docbkx/performance.xml
Author: jdcryans
Date: Wed Aug 7 23:15:18 2013
New Revision: 1511530
URL: http://svn.apache.org/r1511530
Log:
HBASE-8322 Re-enable hbase checksums by default
HBASE-8785 revise zookeeper session timeout setting
Modified:
hbase/trunk/hbase-common/src/main/resources/hbase-default.xml
hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
hbase/trunk/src/main/docbkx/performance.xml
Modified: hbase/trunk/hbase-common/src/main/resources/hbase-default.xml
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-common/src/main/resources/hbase-default.xml?rev=1511530&r1=1511529&r2=1511530&view=diff
==============================================================================
--- hbase/trunk/hbase-common/src/main/resources/hbase-default.xml (original)
+++ hbase/trunk/hbase-common/src/main/resources/hbase-default.xml Wed Aug 7 23:15:18 2013
@@ -283,12 +283,16 @@ possible configurations would overwhelm
<property>
<name>zookeeper.session.timeout</name>
<value>90000</value>
- <description>ZooKeeper session timeout.
- HBase passes this to the zk quorum as suggested maximum time for a
- session (This setting becomes zookeeper's 'maxSessionTimeout'). See
- http://hadoop.apache.org/zookeeper/docs/current/zookeeperProgrammers.html#ch_zkSessions
- "The client sends a requested timeout, the server responds with the
- timeout that it can give the client. " In milliseconds.</description>
+ <description>ZooKeeper session timeout in milliseconds. It is used in two different ways.
+ First, this value is used in the ZK client that HBase uses to connect to the ensemble.
+ It is also used by HBase when it starts a ZK server and it is passed as the 'maxSessionTimeout'. See
+ http://hadoop.apache.org/zookeeper/docs/current/zookeeperProgrammers.html#ch_zkSessions.
+ For example, if a HBase region server connects to a ZK ensemble that's also managed by HBase, then the
+ session timeout will be the one specified by this configuration. But, a region server that connects
+ to an ensemble managed with a different configuration will be subjected that ensemble's maxSessionTimeout. So,
+ even though HBase might propose using 90 seconds, the ensemble can have a max timeout lower than this and
+ it will take precedence. The current default that ZK ships with is 40 seconds, which is lower than HBase's.
+ </description>
</property>
<property>
<name>zookeeper.znode.parent</name>
@@ -931,4 +935,32 @@ possible configurations would overwhelm
datanode, performing block recovery to timeout on a dead datanode; usually
dfs.socket.timeout. See the end of HBASE-8389 for more.</description>
</property>
+ <property>
+ <name>hbase.regionserver.checksum.verify</name>
+ <value>true</value>
+ <description>
+ If set to true, HBase will read data and then verify checksums for
+ hfile blocks. Checksum verification inside HDFS will be switched off.
+ If the hbase-checksum verification fails, then it will switch back to
+ using HDFS checksums.
+ </description>
+ </property>
+ <property>
+ <name>hbase.hstore.bytes.per.checksum</name>
+ <value>16384</value>
+ <description>
+ Number of bytes in a newly created checksum chunk for HBase-level
+ checksums in hfile blocks.
+ </description>
+ </property>
+ <property>
+ <name>hbase.hstore.checksum.algorithm</name>
+ <value>CRC32</value>
+ <description>
+ Name of an algorithm that is used to compute checksums. Possible values
+ are NULL, CRC32, CRC32C.
+ </description>
+ </property>
+
+
</configuration>
Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1511530&r1=1511529&r2=1511530&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java Wed Aug 7 23:15:18 2013
@@ -493,6 +493,16 @@ public class HRegionServer implements Cl
// is enabled, then we automatically switch off hdfs checksum verification.
this.useHBaseChecksum = conf.getBoolean(HConstants.HBASE_CHECKSUM_VERIFICATION, false);
+ // check that the user has not set the "dfs.client.read.shortcircuit.skip.checksum" property.
+ boolean shortCircuitSkipChecksum = conf.getBoolean(
+ "dfs.client.read.shortcircuit.skip.checksum", false);
+ if (shortCircuitSkipChecksum) {
+ LOG.warn("Configuration \"dfs.client.read.shortcircuit.skip.checksum\" should not " +
+ "be set to true." + (this.useHBaseChecksum ? " HBase checksum doesn't require " +
+ "it, see https://issues.apache.org/jira/browse/HBASE-6868." : ""));
+ assert !shortCircuitSkipChecksum; //this will fail if assertions are on
+ }
+
// Config'ed params
this.numRetries = this.conf.getInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER,
HConstants.DEFAULT_HBASE_CLIENT_RETRIES_NUMBER);
Modified: hbase/trunk/src/main/docbkx/performance.xml
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/docbkx/performance.xml?rev=1511530&r1=1511529&r2=1511530&view=diff
==============================================================================
Binary files - no diff available.