HBASE-1413 Fall back to filesystem block size default if HLog blocksize is not specified
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@774242 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
734bc8d117
commit
e81f7f3484
18
CHANGES.txt
18
CHANGES.txt
|
@ -111,12 +111,14 @@ Release 0.20.0 - Unreleased
|
|||
HBASE-1264 Wrong return values of comparators for ColumnValueFilter
|
||||
(Thomas Schneider via Andrew Purtell)
|
||||
HBASE-1374 NPE out of ZooKeeperWrapper.loadZooKeeperConfig
|
||||
HBASE-1336 Splitting up the compare of family+column into 2 different compare
|
||||
HBASE-1336 Splitting up the compare of family+column into 2 different
|
||||
compare
|
||||
HBASE-1377 RS address is null in master web UI
|
||||
HBASE-1344 WARN IllegalStateException: Cannot set a region as open if it has
|
||||
not been pending
|
||||
HBASE-1344 WARN IllegalStateException: Cannot set a region as open if it
|
||||
has not been pending
|
||||
HBASE-1386 NPE in housekeeping
|
||||
HBASE-1396 Remove unused sequencefile and mapfile config. from hbase-default.xml
|
||||
HBASE-1396 Remove unused sequencefile and mapfile config. from
|
||||
hbase-default.xml
|
||||
HBASE-1398 TableOperation doesnt format keys for meta scan properly
|
||||
(Ryan Rawson via Stack)
|
||||
HBASE-1399 Can't drop tables since HBASE-1398 (Ryan Rawson via Andrew
|
||||
|
@ -144,7 +146,8 @@ Release 0.20.0 - Unreleased
|
|||
initial Michael Gottesman work via Stack)
|
||||
HBASE-5121 Fix shell usage for format.width
|
||||
HBASE-845 HCM.isTableEnabled doesn't really tell if it is, or not
|
||||
HBASE-903 [shell] Can't set table descriptor attributes when I alter a table
|
||||
HBASE-903 [shell] Can't set table descriptor attributes when I alter a
|
||||
table
|
||||
HBASE-1166 saveVersion.sh doesn't work with git (Nitay Joffe via Stack)
|
||||
HBASE-1167 JSP doesn't work in a git checkout (Nitay Joffe via Andrew
|
||||
Purtell)
|
||||
|
@ -178,7 +181,8 @@ Release 0.20.0 - Unreleased
|
|||
(Jonathan Gray via Stack)
|
||||
HBASE-1258,1259 ganglia metrics for 'requests' is confusing
|
||||
(Ryan Rawson via Stack)
|
||||
HBASE-1265 HLogEdit static constants should be final (Nitay Joffe via Stack)
|
||||
HBASE-1265 HLogEdit static constants should be final (Nitay Joffe via
|
||||
Stack)
|
||||
HBASE-1244 ZooKeeperWrapper constants cleanup (Nitay Joffe via Stack)
|
||||
HBASE-1262 Eclipse warnings, including performance related things like
|
||||
synthetic accessors (Nitay Joffe via Stack)
|
||||
|
@ -236,6 +240,8 @@ Release 0.20.0 - Unreleased
|
|||
(Erik Holstad and Jon Gray via Stack)
|
||||
HBASE-1380 Make KeyValue implement HeapSize
|
||||
(Erik Holstad and Jon Gray via Stack)
|
||||
HBASE-1413 Fall back to filesystem block size default if HLog blocksize is
|
||||
not specified
|
||||
|
||||
OPTIMIZATIONS
|
||||
HBASE-1412 Change values for delete column and column family in KeyValue
|
||||
|
|
|
@ -197,14 +197,6 @@
|
|||
milliseconds.
|
||||
</description>
|
||||
</property>
|
||||
<property>
|
||||
<name>hbase.regionserver.hlog.blocksize</name>
|
||||
<value>1048576</value>
|
||||
<description>Block size for HLog files. To minimize potential data loss,
|
||||
the size should be (avg key length) * (avg value length) * flushlogentries.
|
||||
Default 1MB.
|
||||
</description>
|
||||
</property>
|
||||
<property>
|
||||
<name>hbase.regionserver.thread.splitcompactcheckfrequency</name>
|
||||
<value>20000</value>
|
||||
|
|
|
@ -172,8 +172,8 @@ public class HLog implements HConstants, Syncable {
|
|||
conf.getInt("hbase.regionserver.maxlogentries", 100000);
|
||||
this.flushlogentries =
|
||||
conf.getInt("hbase.regionserver.flushlogentries", 100);
|
||||
this.blocksize =
|
||||
conf.getLong("hbase.regionserver.hlog.blocksize", 1024L * 1024L);
|
||||
this.blocksize = conf.getLong("hbase.regionserver.hlog.blocksize",
|
||||
this.fs.getDefaultBlockSize());
|
||||
this.optionalFlushInterval =
|
||||
conf.getLong("hbase.regionserver.optionallogflushinterval", 10 * 1000);
|
||||
this.lastLogFlushTime = System.currentTimeMillis();
|
||||
|
@ -182,6 +182,10 @@ public class HLog implements HConstants, Syncable {
|
|||
}
|
||||
fs.mkdirs(dir);
|
||||
this.maxLogs = conf.getInt("hbase.regionserver.maxlogs", 64);
|
||||
LOG.info("HLog configuration: blocksize=" + this.blocksize +
|
||||
", maxlogentries=" + this.maxlogentries + ", flushlogentries=" +
|
||||
this.flushlogentries + ", optionallogflushinternal=" +
|
||||
this.optionalFlushInterval + "ms");
|
||||
rollWriter();
|
||||
}
|
||||
|
||||
|
@ -269,7 +273,7 @@ public class HLog implements HConstants, Syncable {
|
|||
new Metadata());
|
||||
|
||||
LOG.info((oldFile != null?
|
||||
"Closed " + oldFile + ", entries=" + this.numEntries + ". ": "") +
|
||||
"Closed " + oldFile + ", entries=" + this.numEntries.get() + ". ": "") +
|
||||
"New log writer: " + FSUtils.getPath(newPath));
|
||||
|
||||
// Can we delete any of the old log files?
|
||||
|
@ -548,7 +552,7 @@ public class HLog implements HConstants, Syncable {
|
|||
long took = System.currentTimeMillis() - now;
|
||||
if (took > 1000) {
|
||||
LOG.warn(Thread.currentThread().getName() + " took " + took +
|
||||
"ms optional sync'ing HLog");
|
||||
"ms optional sync'ing HLog; editcount=" + this.numEntries.get());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -562,10 +566,16 @@ public class HLog implements HConstants, Syncable {
|
|||
private void doWrite(HLogKey logKey, HLogEdit logEdit, boolean sync)
|
||||
throws IOException {
|
||||
try {
|
||||
long now = System.currentTimeMillis();
|
||||
this.writer.append(logKey, logEdit);
|
||||
if (sync || this.unflushedEntries.incrementAndGet() >= flushlogentries) {
|
||||
sync();
|
||||
}
|
||||
long took = System.currentTimeMillis() - now;
|
||||
if (took > 1000) {
|
||||
LOG.warn(Thread.currentThread().getName() + " took " + took +
|
||||
"ms appending an edit to HLog; editcount=" + this.numEntries.get());
|
||||
}
|
||||
} catch (IOException e) {
|
||||
LOG.fatal("Could not append. Requesting close of log", e);
|
||||
requestLogRoll();
|
||||
|
@ -730,7 +740,7 @@ public class HLog implements HConstants, Syncable {
|
|||
for (int i = 0; i < logfiles.length; i++) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Splitting " + (i + 1) + " of " + logfiles.length + ": " +
|
||||
logfiles[i].getPath());
|
||||
logfiles[i].getPath() + ", length=" + logfiles[i].getLen());
|
||||
}
|
||||
// Check for possibly empty file. With appends, currently Hadoop reports
|
||||
// a zero length even if the file has been sync'd. Revisit if
|
||||
|
|
Loading…
Reference in New Issue