hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nkey...@apache.org
Subject svn commit: r1564248 - in /hbase/branches/0.98: hbase-client/src/main/java/org/apache/hadoop/hbase/catalog/ hbase-client/src/main/java/org/apache/hadoop/hbase/client/ hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/ hbase-server/src/main/java/or...
Date Tue, 04 Feb 2014 10:37:27 GMT
Author: nkeywal
Date: Tue Feb  4 10:37:26 2014
New Revision: 1564248

URL: http://svn.apache.org/r1564248
Log:
HBASE-10455 cleanup InterruptedException management

Modified:
    hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/catalog/MetaReader.java
    hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
    hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
    hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
    hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
    hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTableUtil.java
    hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCaller.java
    hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/BlockingRpcCallback.java
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableMapReduceUtil.java
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableLockManager.java
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/MetaServerShutdownHandler.java
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/ServerShutdownHandler.java
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java

Modified: hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/catalog/MetaReader.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/catalog/MetaReader.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/catalog/MetaReader.java
(original)
+++ hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/catalog/MetaReader.java
Tue Feb  4 10:37:26 2014
@@ -35,6 +35,7 @@ import org.apache.hadoop.hbase.util.Byte
 import org.apache.hadoop.hbase.util.Pair;
 
 import java.io.IOException;
+import java.io.InterruptedIOException;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -341,7 +342,7 @@ public class MetaReader {
       result = getTableRegionsAndLocations(catalogTracker, tableName,
         excludeOfflinedSplitParents);
     } catch (InterruptedException e) {
-      throw new RuntimeException(e);
+      throw (InterruptedIOException)new InterruptedIOException().initCause(e);
     }
     return getListOfHRegionInfos(result);
   }

Modified: hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
(original)
+++ hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
Tue Feb  4 10:37:26 2014
@@ -694,7 +694,7 @@ class AsyncProcess<CResult> {
       Thread.sleep(backOffTime);
     } catch (InterruptedException e) {
       LOG.warn("#" + id + ", not sent: " + toReplay.size() + " operations, " + oldLocation,
e);
-      Thread.interrupted();
+      Thread.currentThread().interrupt();
       return;
     }
 

Modified: hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
(original)
+++ hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
Tue Feb  4 10:37:26 2014
@@ -221,8 +221,7 @@ public class HBaseAdmin implements Abort
       ct.start();
     } catch (InterruptedException e) {
       // Let it out as an IOE for now until we redo all so tolerate IEs
-      Thread.currentThread().interrupt();
-      throw new IOException("Interrupted", e);
+      throw (InterruptedIOException)new InterruptedIOException("Interrupted").initCause(e);
     }
     return ct;
   }
@@ -800,10 +799,9 @@ public class HBaseAdmin implements Abort
       try {
         Thread.sleep(sleep);
       } catch (InterruptedException e) {
-        Thread.currentThread().interrupt();
         // Do this conversion rather than let it out because do not want to
         // change the method signature.
-        throw new IOException("Interrupted", e);
+        throw (InterruptedIOException)new InterruptedIOException("Interrupted").initCause(e);
       }
     }
     if (!enabled) {
@@ -953,8 +951,7 @@ public class HBaseAdmin implements Abort
       } catch (InterruptedException e) {
         // Do this conversion rather than let it out because do not want to
         // change the method signature.
-        Thread.currentThread().interrupt();
-        throw new IOException("Interrupted", e);
+        throw (InterruptedIOException)new InterruptedIOException("Interrupted").initCause(e);
       }
     }
     if (!disabled) {
@@ -2336,8 +2333,8 @@ public class HBaseAdmin implements Abort
       } catch (IOException e) {
         throw new ZooKeeperConnectionException("Can't connect to ZooKeeper", e);
       } catch (InterruptedException e) {
-        Thread.currentThread().interrupt();
-        throw new ZooKeeperConnectionException("Can't connect to ZooKeeper", e);
+        throw (InterruptedIOException)
+            new InterruptedIOException("Can't connect to ZooKeeper").initCause(e);
       } catch (KeeperException e) {
         throw new ZooKeeperConnectionException("Can't connect to ZooKeeper", e);
       } finally {

Modified: hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
(original)
+++ hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
Tue Feb  4 10:37:26 2014
@@ -20,6 +20,7 @@ package org.apache.hadoop.hbase.client;
 
 import java.io.Closeable;
 import java.io.IOException;
+import java.io.InterruptedIOException;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.UndeclaredThrowableException;
 import java.net.SocketException;
@@ -1308,8 +1309,7 @@ public class HConnectionManager {
         try{
           Thread.sleep(ConnectionUtils.getPauseTime(this.pause, tries));
         } catch (InterruptedException e) {
-          Thread.currentThread().interrupt();
-          throw new IOException("Giving up trying to location region in " +
+          throw new InterruptedIOException("Giving up trying to location region in " +
             "meta: thread is interrupted.");
         }
       }
@@ -1631,7 +1631,6 @@ public class HConnectionManager {
                 try {
                   Thread.sleep(pauseTime);
                 } catch (InterruptedException e) {
-                  Thread.currentThread().interrupt();
                   throw new RuntimeException(
                       "Thread was interrupted while trying to connect to master.", e);
                 }

Modified: hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
(original)
+++ hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
Tue Feb  4 10:37:26 2014
@@ -780,7 +780,7 @@ public class HTable implements HTableInt
 
       return results;
     } catch (InterruptedException e) {
-      throw new IOException(e);
+      throw (InterruptedIOException)new InterruptedIOException().initCause(e);
     }
   }
 
@@ -862,7 +862,7 @@ public class HTable implements HTableInt
     try {
       batch(deletes, results);
     } catch (InterruptedException e) {
-      throw new IOException(e);
+      throw (InterruptedIOException)new InterruptedIOException().initCause(e);
     } finally {
       // mutate list so that it is empty for complete success, or contains only failed records
       // results are returned in the same order as the requests in list
@@ -1201,7 +1201,7 @@ public class HTable implements HTableInt
     try {
       r1 = batch(gets);
     } catch (InterruptedException e) {
-      throw new IOException(e);
+      throw (InterruptedIOException)new InterruptedIOException().initCause(e);
     }
 
     // translate.
@@ -1529,7 +1529,6 @@ public class HTable implements HTableInt
             + Bytes.toStringBinary(e.getKey()), ee);
         throw ee.getCause();
       } catch (InterruptedException ie) {
-        Thread.currentThread().interrupt();
         throw new InterruptedIOException("Interrupted calling coprocessor service " + service.getName()
             + " for row " + Bytes.toStringBinary(e.getKey()))
             .initCause(ie);

Modified: hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTableUtil.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTableUtil.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTableUtil.java
(original)
+++ hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTableUtil.java
Tue Feb  4 10:37:26 2014
@@ -23,6 +23,7 @@ import org.apache.hadoop.classification.
 import org.apache.hadoop.hbase.HRegionLocation;
 
 import java.io.IOException;
+import java.io.InterruptedIOException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -96,7 +97,7 @@ public class HTableUtil {
         htable.batch( rsRows );
       }
     } catch (InterruptedException e) {
-      throw new IOException(e); 
+      throw (InterruptedIOException)new InterruptedIOException().initCause(e);
     }
 		
   }

Modified: hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCaller.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCaller.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCaller.java
(original)
+++ hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCaller.java
Tue Feb  4 10:37:26 2014
@@ -151,7 +151,6 @@ public class RpcRetryingCaller<T> {
       try {
         Thread.sleep(expectedSleep);
       } catch (InterruptedException e) {
-        Thread.currentThread().interrupt();
         throw new InterruptedIOException("Interrupted after " + tries + " tries  on " + retries);
       }
     }

Modified: hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/BlockingRpcCallback.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/BlockingRpcCallback.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/BlockingRpcCallback.java
(original)
+++ hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/BlockingRpcCallback.java
Tue Feb  4 10:37:26 2014
@@ -61,7 +61,6 @@ public class BlockingRpcCallback<R> impl
       try {
         this.wait();
       } catch (InterruptedException ie) {
-        Thread.currentThread().interrupt();
         InterruptedIOException exception = new InterruptedIOException(ie.getMessage());
         exception.initCause(ie);
         throw exception;

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java
(original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java
Tue Feb  4 10:37:26 2014
@@ -159,7 +159,7 @@ public class SimpleRpcScheduler implemen
         CallRunner task = myQueue.take();
         task.run();
       } catch (InterruptedException e) {
-        Thread.interrupted();
+        Thread.currentThread().interrupt();
       }
     }
   }

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableMapReduceUtil.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableMapReduceUtil.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableMapReduceUtil.java
(original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableMapReduceUtil.java
Tue Feb  4 10:37:26 2014
@@ -204,7 +204,7 @@ public class TableMapReduceUtil {
         }
       } catch (InterruptedException ie) {
         ie.printStackTrace();
-        Thread.interrupted();
+        Thread.currentThread().interrupt();
       }
     }
   }

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
(original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
Tue Feb  4 10:37:26 2014
@@ -20,6 +20,7 @@ package org.apache.hadoop.hbase.mapreduc
 
 import java.io.FileNotFoundException;
 import java.io.IOException;
+import java.io.InterruptedIOException;
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -370,7 +371,7 @@ public class LoadIncrementalHFiles exten
         throw new IllegalStateException(t);
       } catch (InterruptedException e1) {
         LOG.error("Unexpected interrupted exception during bulk load", e1);
-        throw new IllegalStateException(e1);
+        throw (InterruptedIOException)new InterruptedIOException().initCause(e1);
       }
     }
   }
@@ -418,7 +419,7 @@ public class LoadIncrementalHFiles exten
         throw new IllegalStateException(t);
       } catch (InterruptedException e1) {
         LOG.error("Unexpected interrupted exception during splitting", e1);
-        throw new IllegalStateException(e1);
+        throw (InterruptedIOException)new InterruptedIOException().initCause(e1);
       }
     }
     return regionGroups;

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java
(original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java
Tue Feb  4 10:37:26 2014
@@ -390,7 +390,7 @@ public class TableMapReduceUtil {
         obtainAuthTokenForJob(job, job.getConfiguration(), user);
       } catch (InterruptedException ie) {
         LOG.info("Interrupted obtaining user authentication token");
-        Thread.interrupted();
+        Thread.currentThread().interrupt();
       }
     }
   }

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java
(original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java
Tue Feb  4 10:37:26 2014
@@ -19,6 +19,7 @@
 package org.apache.hadoop.hbase.master;
 
 import java.io.IOException;
+import java.io.InterruptedIOException;
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
@@ -676,8 +677,7 @@ public class MasterFileSystem {
         this.master.getCatalogTracker().waitForMeta();
         return MetaReader.getServerUserRegions(this.master.getCatalogTracker(), serverName);
       } catch (InterruptedException e) {
-        Thread.currentThread().interrupt();
-        throw new IOException("Interrupted", e);
+        throw (InterruptedIOException)new InterruptedIOException().initCause(e);
       }
     }
     return null;

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableLockManager.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableLockManager.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableLockManager.java
(original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableLockManager.java
Tue Feb  4 10:37:26 2014
@@ -309,7 +309,6 @@ public abstract class TableLockManager {
           lock.release();
         } catch (InterruptedException e) {
           LOG.warn("Interrupted while releasing a lock for " + tableName);
-          Thread.currentThread().interrupt();
           throw new InterruptedIOException();
         }
         if (LOG.isTraceEnabled()) {

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java
(original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java
Tue Feb  4 10:37:26 2014
@@ -20,6 +20,7 @@ package org.apache.hadoop.hbase.master;
 
 import java.io.FileNotFoundException;
 import java.io.IOException;
+import java.io.InterruptedIOException;
 import java.util.NavigableSet;
 
 import org.apache.commons.logging.Log;
@@ -99,7 +100,7 @@ public class TableNamespaceManager {
         Thread.sleep(100);
       }
     } catch (InterruptedException e) {
-      throw new IOException("Wait for namespace table assignment interrupted", e);
+      throw (InterruptedIOException)new InterruptedIOException().initCause(e);
     }
 
     // initialize namespace table

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/MetaServerShutdownHandler.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/MetaServerShutdownHandler.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/MetaServerShutdownHandler.java
(original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/MetaServerShutdownHandler.java
Tue Feb  4 10:37:26 2014
@@ -19,6 +19,7 @@
 package org.apache.hadoop.hbase.master.handler;
 
 import java.io.IOException;
+import java.io.InterruptedIOException;
 import java.util.HashSet;
 import java.util.Set;
 
@@ -179,7 +180,7 @@ public class MetaServerShutdownHandler e
         } catch (InterruptedException e1) {
           LOG.warn("Interrupted when is the thread sleep", e1);
           Thread.currentThread().interrupt();
-          throw new IOException("Interrupted", e1);
+          throw (InterruptedIOException)new InterruptedIOException().initCause(e1);
         }
         iFlag++;
       }

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/ServerShutdownHandler.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/ServerShutdownHandler.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/ServerShutdownHandler.java
(original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/ServerShutdownHandler.java
Tue Feb  4 10:37:26 2014
@@ -173,7 +173,7 @@ public class ServerShutdownHandler exten
           break;
         } catch (InterruptedException e) {
           Thread.currentThread().interrupt();
-          throw new IOException("Interrupted", e);
+          throw (InterruptedIOException)new InterruptedIOException().initCause(e);
         } catch (IOException ioe) {
           LOG.info("Received exception accessing hbase:meta during server shutdown of " +
             serverName + ", retrying hbase:meta read", ioe);
@@ -282,7 +282,7 @@ public class ServerShutdownHandler exten
         am.assign(toAssignRegions);
       } catch (InterruptedException ie) {
         LOG.error("Caught " + ie + " during round-robin assignment");
-        throw new IOException(ie);
+        throw (InterruptedIOException)new InterruptedIOException().initCause(ie);
       }
 
       if (this.shouldSplitHlog && this.distributedLogReplay) {

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
(original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Tue Feb  4 10:37:26 2014
@@ -726,7 +726,7 @@ public class HRegion implements HeapSize
         }
         allStoresOpened = true;
       } catch (InterruptedException e) {
-        throw new IOException(e);
+        throw (InterruptedIOException)new InterruptedIOException().initCause(e);
       } catch (ExecutionException e) {
         throw new IOException(e.getCause());
       } finally {
@@ -1096,7 +1096,7 @@ public class HRegion implements HeapSize
             familyFiles.addAll(storeFiles.getSecond());
           }
         } catch (InterruptedException e) {
-          throw new IOException(e);
+          throw (InterruptedIOException)new InterruptedIOException().initCause(e);
         } catch (ExecutionException e) {
           throw new IOException(e.getCause());
         } finally {

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
(original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Tue Feb  4 10:37:26 2014
@@ -4136,7 +4136,6 @@ public class HRegionServer implements Cl
     try {
       canProceed = nonceManager.startOperation(nonceGroup, mutation.getNonce(), this);
     } catch (InterruptedException ex) {
-      // Probably should not happen.
       throw new InterruptedIOException("Nonce start operation interrupted");
     }
     if (!canProceed) {

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java
(original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java
Tue Feb  4 10:37:26 2014
@@ -23,6 +23,7 @@ import static org.apache.hadoop.hbase.ex
 import static org.apache.hadoop.hbase.executor.EventType.RS_ZK_REGION_SPLITTING;
 
 import java.io.IOException;
+import java.io.InterruptedIOException;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.ListIterator;
@@ -398,8 +399,7 @@ public class SplitTransaction {
         aOpener.join();
         bOpener.join();
       } catch (InterruptedException e) {
-        Thread.currentThread().interrupt();
-        throw new IOException("Interrupted " + e.getMessage());
+        throw (InterruptedIOException)new InterruptedIOException().initCause(e);
       }
       if (aOpener.getException() != null) {
         throw new IOException("Failed " +
@@ -731,8 +731,7 @@ public class SplitTransaction {
             " files and create the references, aborting split");
       }
     } catch (InterruptedException e) {
-      Thread.currentThread().interrupt();
-      throw new IOException("Interrupted while waiting for file splitters", e);
+      throw (InterruptedIOException)new InterruptedIOException().initCause(e);
     }
 
     // Look for any exception
@@ -740,9 +739,7 @@ public class SplitTransaction {
       try {
         future.get();
       } catch (InterruptedException e) {
-        Thread.currentThread().interrupt();
-        throw new IOException(
-            "Interrupted while trying to get the results of file splitters", e);
+        throw (InterruptedIOException)new InterruptedIOException().initCause(e);
       } catch (ExecutionException e) {
         throw new IOException(e);
       }

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
(original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
Tue Feb  4 10:37:26 2014
@@ -735,7 +735,7 @@ public class StoreScanner extends NonRev
     try {
       latch.await();
     } catch (InterruptedException ie) {
-      throw new InterruptedIOException(ie.getMessage());
+      throw (InterruptedIOException)new InterruptedIOException().initCause(ie);
     }
 
     for (ParallelSeekHandler handler : handlers) {

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java
(original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java
Tue Feb  4 10:37:26 2014
@@ -1635,8 +1635,7 @@ public class HLogSplitter {
         try {
           Thread.sleep(expectedSleep);
         } catch (InterruptedException e) {
-          Thread.currentThread().interrupt();
-          throw new IOException("Interrupted when waiting regon " +
+          throw new IOException("Interrupted when waiting region " +
               loc.getRegionInfo().getEncodedName() + " online.", e);
         }
         tries++;

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java
(original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java
Tue Feb  4 10:37:26 2014
@@ -19,6 +19,7 @@
 package org.apache.hadoop.hbase.replication.regionserver;
 
 import java.io.IOException;
+import java.io.InterruptedIOException;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
@@ -236,7 +237,7 @@ public class ReplicationSink {
         table.batch(rows);
       }
     } catch (InterruptedException ix) {
-      throw new IOException(ix);
+      throw (InterruptedIOException)new InterruptedIOException().initCause(ix);
     } finally {
       if (table != null) {
         table.close();

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
(original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
Tue Feb  4 10:37:26 2014
@@ -24,6 +24,7 @@ import java.io.EOFException;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.InterruptedIOException;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.net.InetSocketAddress;
@@ -676,15 +677,13 @@ public abstract class FSUtils {
           try {
             Thread.sleep(wait);
           } catch (InterruptedException ie) {
-            Thread.interrupted();
-            break;
+            throw (InterruptedIOException)new InterruptedIOException().initCause(ie);
           }
         } else {
           throw ioe;
         }
       }
     }
-    return false;
   }
 
   /**
@@ -785,7 +784,7 @@ public abstract class FSUtils {
           try {
             Thread.sleep(wait);
           } catch (InterruptedException ie) {
-            Thread.interrupted();
+            Thread.currentThread().interrupt();
             break;
           }
         } else {
@@ -1866,7 +1865,7 @@ public abstract class FSUtils {
               + tpe.getTaskCount() + " }");
         }
       } catch (InterruptedException e) {
-        throw new IOException(e);
+        throw (InterruptedIOException)new InterruptedIOException().initCause(e);
       }
     }
 

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java?rev=1564248&r1=1564247&r2=1564248&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
(original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
Tue Feb  4 10:37:26 2014
@@ -2613,7 +2613,6 @@ public class HBaseFsck extends Configure
       try {
         rets = executor.invokeAll(merges);
       } catch (InterruptedException e) {
-        e.printStackTrace();
         LOG.error("Overlap merges were interrupted", e);
         return false;
       }



Mime
View raw message