You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by li...@apache.org on 2016/07/08 18:40:30 UTC
hbase git commit: HBASE-16201 fix a NPE issue in RpcServer
Repository: hbase
Updated Branches:
refs/heads/branch-1.1 d0756e306 -> 73189eb80
HBASE-16201 fix a NPE issue in RpcServer
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/73189eb8
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/73189eb8
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/73189eb8
Branch: refs/heads/branch-1.1
Commit: 73189eb801f1c49e738e8a79838b1cd17b1fcff5
Parents: d0756e3
Author: Yu Li <li...@apache.org>
Authored: Sat Jul 9 01:05:10 2016 +0800
Committer: Yu Li <li...@apache.org>
Committed: Sat Jul 9 02:39:43 2016 +0800
----------------------------------------------------------------------
.../src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/73189eb8/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
index 19ecd57..6ba125e 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
@@ -2158,7 +2158,13 @@ public class RpcServer implements RpcServerInterface {
// The above callBlockingMethod will always return a SE. Strip the SE wrapper before
// putting it on the wire. Its needed to adhere to the pb Service Interface but we don't
// need to pass it over the wire.
- if (e instanceof ServiceException) e = e.getCause();
+ if (e instanceof ServiceException) {
+ if (e.getCause() == null) {
+ LOG.debug("Caught a ServiceException with null cause", e);
+ } else {
+ e = e.getCause();
+ }
+ }
// increment the number of requests that were exceptions.
metrics.exception(e);