hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject [4/5] hbase git commit: HBASE-13789 ForeignException should not be sent to the client
Date Fri, 29 May 2015 19:08:15 GMT
HBASE-13789 ForeignException should not be sent to the client


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/c377d2de
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c377d2de
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c377d2de

Branch: refs/heads/branch-1.0
Commit: c377d2defac3df165c8ff65fb8972120836d7dc9
Parents: 62076f0
Author: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Authored: Fri May 29 19:32:42 2015 +0100
Committer: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Committed: Fri May 29 12:04:15 2015 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hbase/master/MasterRpcServices.java  | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/c377d2de/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
index b6180cf..0ddf0e4 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
@@ -37,6 +37,7 @@ import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.UnknownRegionException;
 import org.apache.hadoop.hbase.MetaTableAccessor;
+import org.apache.hadoop.hbase.errorhandling.ForeignException;
 import org.apache.hadoop.hbase.exceptions.MergeRegionException;
 import org.apache.hadoop.hbase.exceptions.UnknownProtocolException;
 import org.apache.hadoop.hbase.ipc.RpcServer.BlockingServiceAndInterface;
@@ -644,6 +645,8 @@ public class MasterRpcServices extends RSRpcServices
       long waitTime = SnapshotDescriptionUtils.DEFAULT_MAX_WAIT_TIME;
       return ExecProcedureResponse.newBuilder().setExpectedTimeout(
         waitTime).build();
+    } catch (ForeignException e) {
+      throw new ServiceException(e.getCause());
     } catch (IOException e) {
       throw new ServiceException(e);
     }
@@ -877,6 +880,8 @@ public class MasterRpcServices extends RSRpcServices
       boolean done = mpm.isProcedureDone(desc);
       builder.setDone(done);
       return builder.build();
+    } catch (ForeignException e) {
+      throw new ServiceException(e.getCause());
     } catch (IOException e) {
       throw new ServiceException(e);
     }
@@ -902,6 +907,8 @@ public class MasterRpcServices extends RSRpcServices
       boolean done = master.snapshotManager.isRestoreDone(snapshot);
       builder.setDone(done);
       return builder.build();
+    } catch (ForeignException e) {
+      throw new ServiceException(e.getCause());
     } catch (IOException e) {
       throw new ServiceException(e);
     }
@@ -925,6 +932,8 @@ public class MasterRpcServices extends RSRpcServices
       boolean done = master.snapshotManager.isSnapshotDone(request.getSnapshot());
       builder.setDone(done);
       return builder.build();
+    } catch (ForeignException e) {
+      throw new ServiceException(e.getCause());
     } catch (IOException e) {
       throw new ServiceException(e);
     }
@@ -1098,6 +1107,8 @@ public class MasterRpcServices extends RSRpcServices
       SnapshotDescription reqSnapshot = request.getSnapshot();
       master.snapshotManager.restoreSnapshot(reqSnapshot);
       return RestoreSnapshotResponse.newBuilder().build();
+    } catch (ForeignException e) {
+      throw new ServiceException(e.getCause());
     } catch (IOException e) {
       throw new ServiceException(e);
     }
@@ -1157,6 +1168,8 @@ public class MasterRpcServices extends RSRpcServices
       long waitTime = SnapshotDescriptionUtils.getMaxMasterTimeout(master.getConfiguration(),
         snapshot.getType(), SnapshotDescriptionUtils.DEFAULT_MAX_WAIT_TIME);
       return SnapshotResponse.newBuilder().setExpectedTimeout(waitTime).build();
+    } catch (ForeignException e) {
+      throw new ServiceException(e.getCause());
     } catch (IOException e) {
       throw new ServiceException(e);
     }


Mime
View raw message