Repository: hbase
Updated Branches:
  refs/heads/0.98 01039eb2f -> 2f841de98


HBASE-12825 CallRunner exception messages should include destination host:port


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

Branch: refs/heads/0.98
Commit: 2f841de98f0df40a26d00e3710c0eaa3318d9bc4
Parents: 01039eb
Author: Nick Dimiduk <[email protected]>
Authored: Mon Jan 12 11:25:48 2015 -0800
Committer: Nick Dimiduk <[email protected]>
Committed: Mon Jan 12 11:25:48 2015 -0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java | 7 +++----
 .../apache/hadoop/hbase/master/TestHMasterRPCException.java   | 4 ++--
 2 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/2f841de9/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java
index e2b003b..e45685b 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java
@@ -48,8 +48,6 @@ public class CallRunner {
    * On construction, adds the size of this call to the running count of 
outstanding call sizes.
    * Presumption is that we are put on a queue while we wait on an executor to 
run us.  During this
    * time we occupy heap.
-   * @param call The call to run.
-   * @param rpcServer
    */
   // The constructor is shutdown so only RpcServer in this class can make one 
of these.
   CallRunner(final RpcServerInterface rpcServer, final Call call, UserProvider 
userProvider) {
@@ -97,7 +95,8 @@ public class CallRunner {
       TraceScope traceScope = null;
       try {
         if (!this.rpcServer.isStarted()) {
-          throw new ServerNotRunningYetException("Server is not running yet");
+          throw new ServerNotRunningYetException("Server " + 
rpcServer.getListenerAddress()
+              + " is not running yet");
         }
         if (call.tinfo != null) {
           traceScope = Trace.startSpan(call.toTraceString(), call.tinfo);
@@ -145,7 +144,7 @@ public class CallRunner {
       }
     } catch (ClosedChannelException cce) {
       RpcServer.LOG.warn(Thread.currentThread().getName() + ": caught a 
ClosedChannelException, " +
-          "this means that the server was processing a " +
+          "this means that the server " + rpcServer.getListenerAddress() + " 
was processing a " +
           "request but the client went away. The error message was: " +
           cce.getMessage());
     } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/2f841de9/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java
index 414c7cc..51a4498 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java
@@ -19,6 +19,7 @@
 
 package org.apache.hadoop.hbase.master;
 
+import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 import java.io.IOException;
@@ -65,8 +66,7 @@ public class TestHMasterRPCException {
         } catch (ServiceException ex) {
           IOException ie = ProtobufUtil.getRemoteException(ex);
           if (!(ie instanceof SocketTimeoutException)) {
-            if (ie.getMessage().startsWith("org.apache.hadoop.hbase.ipc." +
-                "ServerNotRunningYetException: Server is not running yet")) {
+            if (ie.getMessage().contains("ServerNotRunningYetException")) {
               // Done.  Got the exception we wanted.
               System.out.println("Expected exception: " + ie.getMessage());
               return;

Reply via email to