accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1449741 - /accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java
Date Mon, 25 Feb 2013 15:04:39 GMT
Author: ecn
Date: Mon Feb 25 15:04:39 2013
New Revision: 1449741

URL: http://svn.apache.org/r1449741
Log:
ACCUMULO-1053 propogate exceptions only if append approach to lease recovery fails

Modified:
    accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java

Modified: accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java?rev=1449741&r1=1449740&r2=1449741&view=diff
==============================================================================
--- accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java
(original)
+++ accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java
Mon Feb 25 15:04:39 2013
@@ -16,6 +16,8 @@
  */
 package org.apache.accumulo.server.master.recovery;
 
+import java.io.IOException;
+
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.fate.Repo;
@@ -71,12 +73,16 @@ public class RecoverLease extends Master
     
     if (fs instanceof DistributedFileSystem) {
       DistributedFileSystem dfs = (DistributedFileSystem) fs;
-      if (!dfs.recoverLease(source)) {
-        log.info("Waiting for file to be closed " + source.toString());
-        return 1000;
+      try {
+        if (!dfs.recoverLease(source)) {
+          log.info("Waiting for file to be closed " + source.toString());
+          return 1000;
+        }
+        log.info("Recovered lease on " + source.toString());
+        return 0;
+      } catch (IOException ex) {
+        log.error("Error recovery lease on " + source.toString(), ex);
       }
-      log.info("Recovered lease on " + source.toString());
-      return 0;
     } else if (fs instanceof LocalFileSystem) {
       // ignore
     } else {



Mime
View raw message