hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r648030 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/regionserver/HLog.java
Date Mon, 14 Apr 2008 22:07:12 GMT
Author: jimk
Date: Mon Apr 14 15:07:11 2008
New Revision: 648030

URL: http://svn.apache.org/viewvc?rev=648030&view=rev
Log:
HBASE-11    Unexpected exits corrupt DFS

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HLog.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=648030&r1=648029&r2=648030&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Mon Apr 14 15:07:11 2008
@@ -3,6 +3,7 @@
    HBASE-574   HBase does not load hadoop native libs (Rong-En Fan via Stack)
    HBASE-573   HBase does not read hadoop-*.xml for dfs configuration after 
                moving out hadoop/contrib
+   HBASE-11    Unexpected exits corrupt DFS
 
 Release 0.1.1 - 04/11/2008
 

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HLog.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HLog.java?rev=648030&r1=648029&r2=648030&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HLog.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HLog.java Mon Apr 14
15:07:11 2008
@@ -20,6 +20,7 @@
 package org.apache.hadoop.hbase.regionserver;
 
 import java.io.FileNotFoundException;
+import java.io.EOFException;
 import java.io.IOException;
 import java.util.Collections;
 import java.util.HashMap;
@@ -296,7 +297,7 @@
   private void deleteLogFile(final Path p, final Long seqno) throws IOException {
     LOG.info("removing old log file " + p.toString() +
       " whose highest sequence/edit id is " + seqno);
-    this.fs.delete(p);
+    this.fs.delete(p, true);
   }
 
   /**
@@ -314,7 +315,7 @@
    */
   public void closeAndDelete() throws IOException {
     close();
-    fs.delete(dir);
+    fs.delete(dir, true);
   }
 
   /**
@@ -588,7 +589,7 @@
                   w.append(oldkey, oldval);
                 }
                 old.close();
-                fs.delete(oldlogfile);
+                fs.delete(oldlogfile, true);
               }
             }
             w.append(key, val);
@@ -597,8 +598,11 @@
             LOG.debug("Applied " + count + " total edits");
           }
         } catch (IOException e) {
-          LOG.warn("Exception processing " + logfiles[i].getPath() +
-            " -- continuing. Possible DATA LOSS!", e);
+          e = RemoteExceptionHandler.checkIOException(e);
+          if (!(e instanceof EOFException)) {
+            LOG.warn("Exception processing " + logfiles[i].getPath() +
+                " -- continuing. Possible DATA LOSS!", e);
+          }
         } finally {
           try {
             in.close();
@@ -610,7 +614,7 @@
           // nothing we can do about it. Replaying it, it could work but we
           // could be stuck replaying for ever. Just continue though we
           // could have lost some edits.
-          fs.delete(logfiles[i].getPath());
+          fs.delete(logfiles[i].getPath(), true);
         }
       }
     } finally {



Mime
View raw message