You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2011/04/26 20:32:54 UTC

svn commit: r1096839 - /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java

Author: stack
Date: Tue Apr 26 18:32:54 2011
New Revision: 1096839

URL: http://svn.apache.org/viewvc?rev=1096839&view=rev
Log:
HBASE-3674 Treat ChecksumException as we would a ParseException splitting logs; else we replay split on every restart -- fixup for distributed log splitting

Modified:
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java?rev=1096839&r1=1096838&r2=1096839&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java Tue Apr 26 18:32:54 2011
@@ -333,7 +333,7 @@ public class HLogSplitter {
 
     boolean progress_failed = false;
 
-    boolean skipErrors = conf.getBoolean("hbase.hlog.split.skip.errors", false);
+    boolean skipErrors = conf.getBoolean("hbase.hlog.split.skip.errors", true);
     int interval = conf.getInt("hbase.splitlog.report.interval.loglines", 1024);
     // How often to send a progress report (default 1/2 master timeout)
     int period = conf.getInt("hbase.splitlog.report.period",
@@ -685,8 +685,11 @@ public class HLogSplitter {
     } catch (IOException e) {
       // If the IOE resulted from bad file format,
       // then this problem is idempotent and retrying won't help
-      if (e.getCause() instanceof ParseException) {
-        LOG.warn("ParseException from hlog " + path + ".  continuing");
+      if (e.getCause() != null &&
+          (e.getCause() instanceof ParseException ||
+           e.getCause() instanceof org.apache.hadoop.fs.ChecksumException) {
+        LOG.warn("Parse exception " + e.getCause().toString() + " from hlog "
+           + path + ".  continuing");
         return null;
       }
       if (!skipErrors) {