hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1484352 - in /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase: regionserver/wal/HLogSplitter.java util/FSHDFSUtils.java
Date Sun, 19 May 2013 21:21:26 GMT
Author: stack
Date: Sun May 19 21:21:26 2013
New Revision: 1484352

URL: http://svn.apache.org/r1484352
Log:
HBASE-8577 TestZooKeeper#testLogSplittingAfterMasterRecoveryDueToZKExpiry failed intermittently

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSHDFSUtils.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java?rev=1484352&r1=1484351&r2=1484352&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java
Sun May 19 21:21:26 2013
@@ -19,6 +19,7 @@
 package org.apache.hadoop.hbase.regionserver.wal;
 
 import java.io.EOFException;
+import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InterruptedIOException;
 import java.lang.reflect.Constructor;
@@ -836,6 +837,11 @@ public class HLogSplitter {
         }
       }
     } catch (IOException e) {
+      if (e instanceof FileNotFoundException) {
+        // A wal file may not exist anymore. Nothing can be recovered so move on
+        LOG.warn("File " + path + " doesn't exist anymore.", e);
+        return null;
+      }
       if (!skipErrors || e instanceof InterruptedIOException) {
         throw e; // Don't mark the file corrupted if interrupted, or not skipErrors
       }

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSHDFSUtils.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSHDFSUtils.java?rev=1484352&r1=1484351&r2=1484352&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSHDFSUtils.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSHDFSUtils.java Sun
May 19 21:21:26 2013
@@ -76,6 +76,8 @@ public class FSHDFSUtils extends FSUtils
         if (e instanceof LeaseExpiredException && e.getMessage().contains("File does
not exist")) {
           // This exception comes out instead of FNFE, fix it
           throw new FileNotFoundException("The given HLog wasn't found at " + p);
+        } else if (e instanceof FileNotFoundException) {
+          throw e;
         }
         LOG.warn("Got IOException on attempt " + nbAttempt + " to recover lease for file
" + p +
             ", retrying.", e);



Mime
View raw message