You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2013/02/25 15:49:40 UTC
svn commit: r1449730 -
/accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java
Author: ecn
Date: Mon Feb 25 14:49:40 2013
New Revision: 1449730
URL: http://svn.apache.org/r1449730
Log:
ACCUMULO-1053 allow I/O exceptions to propagate out to FATE
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=1449730&r1=1449729&r2=1449730&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 14:49:40 2013
@@ -16,8 +16,6 @@
*/
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,31 +69,22 @@ public class RecoverLease extends Master
if (fs instanceof TraceFileSystem)
fs = ((TraceFileSystem) fs).getImplementation();
- try {
- if (fs instanceof DistributedFileSystem) {
- DistributedFileSystem dfs = (DistributedFileSystem) fs;
- 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;
- } else if (fs instanceof LocalFileSystem) {
- // ignore
- } else {
- throw new IllegalStateException("Don't know how to recover a lease for " + fs.getClass().getName());
+ if (fs instanceof DistributedFileSystem) {
+ DistributedFileSystem dfs = (DistributedFileSystem) fs;
+ if (!dfs.recoverLease(source)) {
+ log.info("Waiting for file to be closed " + source.toString());
+ return 1000;
}
- } catch (IOException ex) {
- log.error("error recovering lease ", ex);
- }
- try {
- fs.append(source).close();
- log.info("Recovered lease on " + source.toString() + " using append");
+ log.info("Recovered lease on " + source.toString());
return 0;
- } catch (IOException ex) {
- log.error("error recovering lease using append", ex);
- return 1000;
+ } else if (fs instanceof LocalFileSystem) {
+ // ignore
+ } else {
+ throw new IllegalStateException("Don't know how to recover a lease for " + fs.getClass().getName());
}
+ fs.append(source).close();
+ log.info("Recovered lease on " + source.toString() + " using append");
+ return 0;
}
@Override