Index: hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java =================================================================== --- hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java (revision 1569387) +++ hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java (working copy) @@ -645,8 +645,8 @@ if (wait > 0) { Thread.sleep(wait); } - } catch (InterruptedException ex) { - // ignore + } catch (InterruptedException ie) { + throw (InterruptedIOException)new InterruptedIOException().initCause(ie); } retries--; } else { @@ -676,8 +676,8 @@ ", retrying in "+wait+"msec: "+StringUtils.stringifyException(ioe)); try { Thread.sleep(wait); - } catch (InterruptedException ie) { - throw (InterruptedIOException)new InterruptedIOException().initCause(ie); + } catch (InterruptedException e) { + throw (InterruptedIOException)new InterruptedIOException().initCause(e); } } else { throw ioe; @@ -783,9 +783,8 @@ ", retrying in " + wait + "msec: " + StringUtils.stringifyException(ioe)); try { Thread.sleep(wait); - } catch (InterruptedException ie) { - Thread.currentThread().interrupt(); - break; + } catch (InterruptedException e) { + throw (InterruptedIOException)new InterruptedIOException().initCause(e); } } else { throw ioe; @@ -852,7 +851,7 @@ try { Thread.sleep(wait); } catch (InterruptedException e) { - //continue + throw (InterruptedIOException)new InterruptedIOException().initCause(e); } } } @@ -1910,4 +1909,4 @@ int hbaseSize = conf.getInt("hbase." + dfsKey, defaultSize); conf.setIfUnset(dfsKey, Integer.toString(hbaseSize)); } -} \ No newline at end of file +} Index: hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java =================================================================== --- hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java (revision 1569387) +++ hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java (working copy) @@ -4043,6 +4043,7 @@ LOG.info("Sleeping " + sleepBeforeRerun + "ms before re-checking after fix..."); Thread.sleep(sleepBeforeRerun); } catch (InterruptedException ie) { + LOG.warn("Interrupted while sleeping"); return this; } // Just report Index: hbase-server/src/main/java/org/apache/hadoop/hbase/util/JVMClusterUtil.java =================================================================== --- hbase-server/src/main/java/org/apache/hadoop/hbase/util/JVMClusterUtil.java (revision 1569387) +++ hbase-server/src/main/java/org/apache/hadoop/hbase/util/JVMClusterUtil.java (working copy) @@ -18,6 +18,7 @@ */ package org.apache.hadoop.hbase.util; +import java.io.InterruptedIOException; import java.io.IOException; import java.io.PrintWriter; import java.lang.reflect.Constructor; @@ -184,7 +185,8 @@ while (findActiveMaster(masters) == null) { try { Thread.sleep(100); - } catch (InterruptedException ignored) { + } catch (InterruptedException e) { + throw (InterruptedIOException)new InterruptedIOException().initCause(e); } if (System.currentTimeMillis() > startTime + 30000) { throw new RuntimeException("Master not active after 30 seconds"); @@ -211,8 +213,11 @@ } // REMOVE if (System.currentTimeMillis() > startTime + 10000) { - - Threads.sleep(1000); + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + throw (InterruptedIOException)new InterruptedIOException().initCause(e); + } } if (System.currentTimeMillis() > startTime + maxwait) { String msg = "Master not initialized after " + maxwait + "ms seconds"; @@ -222,8 +227,8 @@ } try { Thread.sleep(100); - } catch (InterruptedException ignored) { - // Keep waiting + } catch (InterruptedException e) { + throw (InterruptedIOException)new InterruptedIOException().initCause(e); } } }