hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1360172 - in /hbase/trunk: hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Date Wed, 11 Jul 2012 13:50:09 GMT
Author: stack
Date: Wed Jul 11 13:50:09 2012
New Revision: 1360172

URL: http://svn.apache.org/viewvc?rev=1360172&view=rev
Log:
HBASE-5151 Rename hbase.skip.errors in HRegion as it is too general-sounding

Modified:
    hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java

Modified: hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java?rev=1360172&r1=1360171&r2=1360172&view=diff
==============================================================================
--- hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java (original)
+++ hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java Wed Jul
11 13:50:09 2012
@@ -260,6 +260,12 @@ public final class HConstants {
   public static final String HREGION_MEMSTORE_FLUSH_SIZE =
       "hbase.hregion.memstore.flush.size";
 
+  public static final String HREGION_EDITS_REPLAY_SKIP_ERRORS =
+      "hbase.hregion.edits.replay.skip.errors";
+
+  public static final boolean DEFAULT_HREGION_EDITS_REPLAY_SKIP_ERRORS =
+      false;
+
   /** Default size of a reservation block   */
   public static final int DEFAULT_SIZE_RESERVATION_BLOCK = 1024 * 1024 * 5;
 

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=1360172&r1=1360171&r2=1360172&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Wed Jul 11 13:50:09 2012
@@ -2839,10 +2839,19 @@ public class HRegion implements HeapSize
       try {
         seqid = replayRecoveredEdits(edits, maxSeqIdInStores, reporter);
       } catch (IOException e) {
-        boolean skipErrors = conf.getBoolean("hbase.skip.errors", false);
+        boolean skipErrors = conf.getBoolean(
+            HConstants.HREGION_EDITS_REPLAY_SKIP_ERRORS,
+            conf.getBoolean(
+                "hbase.skip.errors",
+                HConstants.DEFAULT_HREGION_EDITS_REPLAY_SKIP_ERRORS));
+        if (conf.get("hbase.skip.errors") != null) {
+          LOG.warn(
+              "The property 'hbase.skip.errors' has been deprecated. Please use " +
+              HConstants.HREGION_EDITS_REPLAY_SKIP_ERRORS + " instead.");
+        }
         if (skipErrors) {
           Path p = HLog.moveAsideBadEditsFile(fs, edits);
-          LOG.error("hbase.skip.errors=true so continuing. Renamed " + edits +
+          LOG.error(HConstants.HREGION_EDITS_REPLAY_SKIP_ERRORS"=true so continuing. Renamed
" + edits +
             " as " + p, e);
         } else {
           throw e;



Mime
View raw message