Index: src/main/java/org/apache/hadoop/hbase/util/FSHDFSUtils.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/util/FSHDFSUtils.java (revision 1470383) +++ src/main/java/org/apache/hadoop/hbase/util/FSHDFSUtils.java (working copy) @@ -73,6 +73,8 @@ long recoveryTimeout = conf.getInt("hbase.lease.recovery.timeout", 300000); // conf parameter passed from unit test, indicating whether fs.append() should be triggered boolean triggerAppend = conf.getBoolean(TEST_TRIGGER_DFS_APPEND, false); + // retrying lease recovery may preempt pending recovery; default to off + int retryInterval = conf.getInt("hbase.lease.recovery.retry.interval", -1); Exception ex = null; while (!recovered) { try { @@ -122,8 +124,9 @@ throw new IOException("Failed to open " + p + " for append", e); } } + if (retryInterval < 0) break; try { - Thread.sleep(1000); + Thread.sleep(retryInterval); } catch (InterruptedException ie) { InterruptedIOException iioe = new InterruptedIOException(); iioe.initCause(ie);