hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bryanduxb...@apache.org
Subject svn commit: r638597 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/regionserver/HLog.java
Date Tue, 18 Mar 2008 21:44:11 GMT
Author: bryanduxbury
Date: Tue Mar 18 14:44:02 2008
New Revision: 638597

URL: http://svn.apache.org/viewvc?rev=638597&view=rev
Log:
HBASE-529 RegionServer needs to recover if datanode goes down
-HLog will now try to reopen the log twice on append failure before taking the region server
down

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=638597&r1=638596&r2=638597&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Tue Mar 18 14:44:02 2008
@@ -93,6 +93,7 @@
    HBASE-477   Add support for an HBASE_CLASSPATH
    HBASE-443   Move internal classes out of HStore
    HBASE-515   At least double default timeouts between regionserver and master
+   HBASE-529   RegionServer needs to recover if datanode goes down
    
 Branch 0.1
 

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=638597&r1=638596&r2=638597&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 Tue Mar 18
14:44:02 2008
@@ -383,7 +383,19 @@
           new HLogKey(regionName, tableName, key.getRow(), seqNum[counter++]);
         HLogEdit logEdit =
           new HLogEdit(key.getColumn(), es.getValue(), key.getTimestamp());
-      	this.writer.append(logKey, logEdit);
+        try {
+      	  this.writer.append(logKey, logEdit);
+      	} catch (IOException e) {
+      	  LOG.error("Could not append to log. Opening new log. Exception: ", e);
+          rollWriter();
+          try {
+            this.writer.append(logKey, logEdit);
+          } catch (IOException e2) { 
+            LOG.fatal("Could not append to log the second time because " + 
+              e2.toString() + ", aborting.");
+            throw e2;
+          }
+      	}
         this.numEntries++;
       }
     }



Mime
View raw message