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:
parent
a64d5d04ec
commit
6baaba0a2c
|
@ -121,6 +121,8 @@ Release 0.21.0 - Unreleased
|
||||||
(Kevin Patterson via Stack)
|
(Kevin Patterson via Stack)
|
||||||
HBASE-1903 Enable DEBUG by default
|
HBASE-1903 Enable DEBUG by default
|
||||||
HBASE-1907 Version all client writables
|
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
|
OPTIMIZATIONS
|
||||||
HBASE-410 [testing] Speed up the test suite
|
HBASE-410 [testing] Speed up the test suite
|
||||||
|
|
|
@ -124,6 +124,7 @@ public class HLog implements HConstants, Syncable {
|
||||||
private volatile long lastLogFlushTime;
|
private volatile long lastLogFlushTime;
|
||||||
private final boolean append;
|
private final boolean append;
|
||||||
private final Method syncfs;
|
private final Method syncfs;
|
||||||
|
private final short replicationLevel;
|
||||||
private final static Object [] NO_ARGS = new Object []{};
|
private final static Object [] NO_ARGS = new Object []{};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -211,6 +212,8 @@ public class HLog implements HConstants, Syncable {
|
||||||
conf.getInt("hbase.regionserver.flushlogentries", 100);
|
conf.getInt("hbase.regionserver.flushlogentries", 100);
|
||||||
this.blocksize = conf.getLong("hbase.regionserver.hlog.blocksize",
|
this.blocksize = conf.getLong("hbase.regionserver.hlog.blocksize",
|
||||||
this.fs.getDefaultBlockSize());
|
this.fs.getDefaultBlockSize());
|
||||||
|
this.replicationLevel = (short) conf.getInt("hbase.regionserver.hlog.replication",
|
||||||
|
this.fs.getDefaultReplication());
|
||||||
// Roll at 95% of block size.
|
// Roll at 95% of block size.
|
||||||
float multi = conf.getFloat("hbase.regionserver.logroll.multiplier", 0.95f);
|
float multi = conf.getFloat("hbase.regionserver.logroll.multiplier", 0.95f);
|
||||||
this.logrollsize = (long)(this.blocksize * multi);
|
this.logrollsize = (long)(this.blocksize * multi);
|
||||||
|
@ -442,7 +445,7 @@ public class HLog implements HConstants, Syncable {
|
||||||
SequenceFile.Writer writer =
|
SequenceFile.Writer writer =
|
||||||
SequenceFile.createWriter(this.fs, this.conf, path, keyClass,
|
SequenceFile.createWriter(this.fs, this.conf, path, keyClass,
|
||||||
valueClass, fs.getConf().getInt("io.file.buffer.size", 4096),
|
valueClass, fs.getConf().getInt("io.file.buffer.size", 4096),
|
||||||
fs.getDefaultReplication(), this.blocksize,
|
this.replicationLevel, this.blocksize,
|
||||||
SequenceFile.CompressionType.NONE, new DefaultCodec(), null,
|
SequenceFile.CompressionType.NONE, new DefaultCodec(), null,
|
||||||
new Metadata());
|
new Metadata());
|
||||||
// Get at the private FSDataOutputStream inside in SequenceFile so we can
|
// Get at the private FSDataOutputStream inside in SequenceFile so we can
|
||||||
|
|
Loading…
Reference in New Issue