HBASE-1914

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@826131 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan Rawson 2009-10-16 23:58:32 +00:00
parent a64d5d04ec
commit 6baaba0a2c
2 changed files with 6 additions and 1 deletions

View File

@ -121,6 +121,8 @@ Release 0.21.0 - Unreleased
(Kevin Patterson via Stack)
HBASE-1903 Enable DEBUG by default
HBASE-1907 Version all client writables
HBASE-1914 hlog should be able to set replication level for the log indendently
from any other files
OPTIMIZATIONS
HBASE-410 [testing] Speed up the test suite

View File

@ -124,6 +124,7 @@ public class HLog implements HConstants, Syncable {
private volatile long lastLogFlushTime;
private final boolean append;
private final Method syncfs;
private final short replicationLevel;
private final static Object [] NO_ARGS = new Object []{};
/*
@ -211,6 +212,8 @@ public class HLog implements HConstants, Syncable {
conf.getInt("hbase.regionserver.flushlogentries", 100);
this.blocksize = conf.getLong("hbase.regionserver.hlog.blocksize",
this.fs.getDefaultBlockSize());
this.replicationLevel = (short) conf.getInt("hbase.regionserver.hlog.replication",
this.fs.getDefaultReplication());
// Roll at 95% of block size.
float multi = conf.getFloat("hbase.regionserver.logroll.multiplier", 0.95f);
this.logrollsize = (long)(this.blocksize * multi);
@ -442,7 +445,7 @@ public class HLog implements HConstants, Syncable {
SequenceFile.Writer writer =
SequenceFile.createWriter(this.fs, this.conf, path, keyClass,
valueClass, fs.getConf().getInt("io.file.buffer.size", 4096),
fs.getDefaultReplication(), this.blocksize,
this.replicationLevel, this.blocksize,
SequenceFile.CompressionType.NONE, new DefaultCodec(), null,
new Metadata());
// Get at the private FSDataOutputStream inside in SequenceFile so we can