hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bryanduxb...@apache.org
Subject svn commit: r638537 - in /hadoop/hbase/branches/0.1: CHANGES.txt src/java/org/apache/hadoop/hbase/HLog.java src/java/org/apache/hadoop/hbase/HRegionServer.java
Date Tue, 18 Mar 2008 19:48:34 GMT
Author: bryanduxbury
Date: Tue Mar 18 12:48:33 2008
New Revision: 638537

URL: http://svn.apache.org/viewvc?rev=638537&view=rev
Log:
HBASE-497 RegionServer needs to recover if datanode goes down
-Added additional logging and error handling to HLog.append

Modified:
    hadoop/hbase/branches/0.1/CHANGES.txt
    hadoop/hbase/branches/0.1/src/java/org/apache/hadoop/hbase/HLog.java
    hadoop/hbase/branches/0.1/src/java/org/apache/hadoop/hbase/HRegionServer.java

Modified: hadoop/hbase/branches/0.1/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.1/CHANGES.txt?rev=638537&r1=638536&r2=638537&view=diff
==============================================================================
--- hadoop/hbase/branches/0.1/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.1/CHANGES.txt Tue Mar 18 12:48:33 2008
@@ -58,7 +58,8 @@
    HBASE-515   At least double default timeouts between regionserver and master
    HBASE-482   package-level javadoc should have example client or at least 
                point at the FAQ
-               
+   HBASE-497   RegionServer needs to recover if datanode goes down
+              
 Release 0.16.0
 
   2008/02/04   HBase is now a subproject of Hadoop. The first HBase release as

Modified: hadoop/hbase/branches/0.1/src/java/org/apache/hadoop/hbase/HLog.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.1/src/java/org/apache/hadoop/hbase/HLog.java?rev=638537&r1=638536&r2=638537&view=diff
==============================================================================
--- hadoop/hbase/branches/0.1/src/java/org/apache/hadoop/hbase/HLog.java (original)
+++ hadoop/hbase/branches/0.1/src/java/org/apache/hadoop/hbase/HLog.java Tue Mar 18 12:48:33
2008
@@ -374,7 +374,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++;
       }
     }

Modified: hadoop/hbase/branches/0.1/src/java/org/apache/hadoop/hbase/HRegionServer.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.1/src/java/org/apache/hadoop/hbase/HRegionServer.java?rev=638537&r1=638536&r2=638537&view=diff
==============================================================================
--- hadoop/hbase/branches/0.1/src/java/org/apache/hadoop/hbase/HRegionServer.java (original)
+++ hadoop/hbase/branches/0.1/src/java/org/apache/hadoop/hbase/HRegionServer.java Tue Mar
18 12:48:33 2008
@@ -534,16 +534,13 @@
           try {
             LOG.info("Rolling hlog. Number of entries: " + log.getNumEntries());
             log.rollWriter();
-            
           } catch (IOException ex) {
             LOG.error("Log rolling failed",
               RemoteExceptionHandler.checkIOException(ex));
             checkFileSystem();
-            
           } catch (Exception ex) {
             LOG.error("Log rolling failed", ex);
             checkFileSystem();
-            
           } finally {
             rollLog = false;
           }



Mime
View raw message