Index: hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSHDFSUtils.java =================================================================== --- hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSHDFSUtils.java (revision 1448794) +++ hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSHDFSUtils.java (working copy) @@ -76,18 +76,19 @@ try { try { DistributedFileSystem dfs = (DistributedFileSystem) fs; - DistributedFileSystem.class.getMethod("recoverLease", new Class[] { Path.class }).invoke( - dfs, p); + recovered = (Boolean) DistributedFileSystem.class.getMethod( + "recoverLease", new Class[] { Path.class }).invoke(dfs, p); } catch (InvocationTargetException ite) { // function was properly called, but threw it's own exception throw (IOException) ite.getCause(); } catch (Exception e) { LOG.debug("Failed fs.recoverLease invocation, " + e.toString() + - ", trying fs.append instead"); + ", trying fs.append instead"); FSDataOutputStream out = fs.append(p); out.close(); + recovered = true; } - recovered = true; + if (recovered) break; } catch (IOException e) { e = RemoteExceptionHandler.checkIOException(e); if (e instanceof AlreadyBeingCreatedException) {