Repository: hbase Updated Branches: refs/heads/branch-1 37040bfc4 -> b6d4fc955
NPE in RpcServer causing intermittent UT failure of TestMasterReplication#testHFileCyclicReplication Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/b6d4fc95 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/b6d4fc95 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/b6d4fc95 Branch: refs/heads/branch-1 Commit: b6d4fc955fe0fc41f5225f1cc2e3e4b92029251c Parents: 37040bf Author: Yu Li <[email protected]> Authored: Sat Jul 9 01:05:10 2016 +0800 Committer: Yu Li <[email protected]> Committed: Sat Jul 9 01:06:55 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/b6d4fc95/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 02fe1df..404f2ec 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 @@ -2298,7 +2298,13 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver { // 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);
