From 92a1bd148e2cdb3da7386d096f5f7e8fa3c32fcf Mon Sep 17 00:00:00 2001 From: larsh Date: Tue, 25 Sep 2012 17:38:14 +0000 Subject: [PATCH] HBASE-6868 Skip checksum is broke; are we double-checksumming by default? git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1390013 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java | 4 +++- .../org/apache/hadoop/hbase/regionserver/HRegionServer.java | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java index dcc692e0d6d..4ef11b91470 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java @@ -79,6 +79,7 @@ public class HFileSystem extends FilterFileSystem { this.useHBaseChecksum = useHBaseChecksum; fs.initialize(getDefaultUri(conf), conf); + addLocationsOrderInterceptor(conf); // If hbase checksum verification is switched on, then create a new // filesystem object that has cksum verification turned off. @@ -89,12 +90,13 @@ public class HFileSystem extends FilterFileSystem { // This manifests itself in that incorrect data is read and HFileBlocks won't be able to read // their header magic numbers. See HBASE-5885 if (useHBaseChecksum && !(fs instanceof LocalFileSystem)) { + conf = new Configuration(conf); + conf.setBoolean("dfs.client.read.shortcircuit.skip.checksum", true); this.noChecksumFs = newInstanceFileSystem(conf); this.noChecksumFs.setVerifyChecksum(false); } else { this.noChecksumFs = fs; } - addLocationsOrderInterceptor(conf); } /** diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index 0f7126fa325..31c68ef1165 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -464,7 +464,7 @@ public class HRegionServer implements ClientProtocol, // do we use checksum verfication in the hbase? If hbase checksum verification // is enabled, then we automatically switch off hdfs checksum verification. this.useHBaseChecksum = conf.getBoolean( - HConstants.HBASE_CHECKSUM_VERIFICATION, true); + HConstants.HBASE_CHECKSUM_VERIFICATION, false); // Config'ed params this.numRetries = conf.getInt("hbase.client.retries.number", 10);