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:
parent
54bfb5833a
commit
92a1bd148e
|
@ -79,6 +79,7 @@ public class HFileSystem extends FilterFileSystem {
|
||||||
this.useHBaseChecksum = useHBaseChecksum;
|
this.useHBaseChecksum = useHBaseChecksum;
|
||||||
|
|
||||||
fs.initialize(getDefaultUri(conf), conf);
|
fs.initialize(getDefaultUri(conf), conf);
|
||||||
|
addLocationsOrderInterceptor(conf);
|
||||||
|
|
||||||
// If hbase checksum verification is switched on, then create a new
|
// If hbase checksum verification is switched on, then create a new
|
||||||
// filesystem object that has cksum verification turned off.
|
// 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
|
// This manifests itself in that incorrect data is read and HFileBlocks won't be able to read
|
||||||
// their header magic numbers. See HBASE-5885
|
// their header magic numbers. See HBASE-5885
|
||||||
if (useHBaseChecksum && !(fs instanceof LocalFileSystem)) {
|
if (useHBaseChecksum && !(fs instanceof LocalFileSystem)) {
|
||||||
|
conf = new Configuration(conf);
|
||||||
|
conf.setBoolean("dfs.client.read.shortcircuit.skip.checksum", true);
|
||||||
this.noChecksumFs = newInstanceFileSystem(conf);
|
this.noChecksumFs = newInstanceFileSystem(conf);
|
||||||
this.noChecksumFs.setVerifyChecksum(false);
|
this.noChecksumFs.setVerifyChecksum(false);
|
||||||
} else {
|
} else {
|
||||||
this.noChecksumFs = fs;
|
this.noChecksumFs = fs;
|
||||||
}
|
}
|
||||||
addLocationsOrderInterceptor(conf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -464,7 +464,7 @@ public class HRegionServer implements ClientProtocol,
|
||||||
// do we use checksum verfication in the hbase? If hbase checksum verification
|
// do we use checksum verfication in the hbase? If hbase checksum verification
|
||||||
// is enabled, then we automatically switch off hdfs checksum verification.
|
// is enabled, then we automatically switch off hdfs checksum verification.
|
||||||
this.useHBaseChecksum = conf.getBoolean(
|
this.useHBaseChecksum = conf.getBoolean(
|
||||||
HConstants.HBASE_CHECKSUM_VERIFICATION, true);
|
HConstants.HBASE_CHECKSUM_VERIFICATION, false);
|
||||||
|
|
||||||
// Config'ed params
|
// Config'ed params
|
||||||
this.numRetries = conf.getInt("hbase.client.retries.number", 10);
|
this.numRetries = conf.getInt("hbase.client.retries.number", 10);
|
||||||
|
|
Loading…
Reference in New Issue