HBASE-3976 Disable Block Cache On Compactions

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1135849 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2011-06-14 23:23:52 +00:00
parent 74eb4dd8b3
commit a86a4b9dc7
2 changed files with 10 additions and 3 deletions

View File

@ -263,6 +263,7 @@ Release 0.91.0 - Unreleased
HBASE-3982 Improvements to TestHFileSeek
HBASE-3940 HBase daemons should log version info at startup and possibly
periodically (Li Pi)
HBASE-3976 Disable Block Cache On Compactions (Karthick Sankarachary)
TASKS
HBASE-3559 Move report of split to master OFF the heartbeat channel

View File

@ -549,12 +549,18 @@ public class Store implements HeapSize {
* @return Writer for a new StoreFile in the tmp dir.
*/
private StoreFile.Writer createWriterInTmp(int maxKeyCount,
Compression.Algorithm compression)
Compression.Algorithm compression) throws IOException {
return createWriterInTmp(maxKeyCount, compression,
conf.getBoolean("hbase.rs.cacheblocksonwrite", false));
}
private StoreFile.Writer createWriterInTmp(int maxKeyCount,
Compression.Algorithm compression, boolean cacheBlocksOnWrite)
throws IOException {
return StoreFile.createWriter(this.fs, region.getTmpDir(), this.blocksize,
compression, this.comparator, this.conf,
this.family.getBloomFilterType(), maxKeyCount,
conf.getBoolean("hbase.rs.cacheblocksonwrite", false));
cacheBlocksOnWrite);
}
/*
@ -1097,7 +1103,7 @@ public class Store implements HeapSize {
while (scanner.next(kvs)) {
if (writer == null && !kvs.isEmpty()) {
writer = createWriterInTmp(maxKeyCount,
this.compactionCompression);
this.compactionCompression, false);
}
if (writer != null) {
// output to writer: