From 8bd2b4d7bddea70f89efc02b248806898887e91f Mon Sep 17 00:00:00 2001 From: Jim Kellerman Date: Wed, 21 Jan 2009 18:18:02 +0000 Subject: [PATCH] HBASE-1138 Set default HLog block size. git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@736359 13f79535-47bb-0310-9956-ffa450edef68 --- conf/hbase-default.xml | 8 ++++++++ src/java/org/apache/hadoop/hbase/regionserver/HLog.java | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/conf/hbase-default.xml b/conf/hbase-default.xml index 9a458dcf18e..d392a912123 100644 --- a/conf/hbase-default.xml +++ b/conf/hbase-default.xml @@ -180,6 +180,14 @@ milliseconds. + + hbase.regionserver.hlog.blocksize + 67108864 + Block size for HLog files. To minimize potential data loss, + the size should be (avg key length) * (avg value length) * flushlogentries. + Default 64MB. + + hbase.regionserver.thread.splitcompactcheckfrequency 20000 diff --git a/src/java/org/apache/hadoop/hbase/regionserver/HLog.java b/src/java/org/apache/hadoop/hbase/regionserver/HLog.java index 545434bcbf6..2636380101b 100644 --- a/src/java/org/apache/hadoop/hbase/regionserver/HLog.java +++ b/src/java/org/apache/hadoop/hbase/regionserver/HLog.java @@ -174,7 +174,7 @@ public class HLog implements HConstants, Syncable { this.flushlogentries = conf.getInt("hbase.regionserver.flushlogentries", 100); this.blocksize = - conf.getLong("hbase.regionserver.hlog.blocksize", 1024L * 1024L); + conf.getLong("hbase.regionserver.hlog.blocksize", 1024L * 1024L * 64L); this.optionalFlushInterval = conf.getLong("hbase.regionserver.optionallogflushinterval", 10 * 1000); this.threadWakeFrequency = conf.getLong(THREAD_WAKE_FREQUENCY, 10 * 1000);