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
This commit is contained in:
larsh 2012-09-25 17:38:14 +00:00
parent 54bfb5833a
commit 92a1bd148e
2 changed files with 4 additions and 2 deletions

View File

@ -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);
}
/**

View File

@ -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);