hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bus...@apache.org
Subject [35/50] [abbrv] hbase git commit: HBASE-16670 Make RpcServer#processRequest logic more robust
Date Thu, 22 Sep 2016 16:34:23 GMT
HBASE-16670 Make RpcServer#processRequest logic more robust


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

Branch: refs/heads/hbase-14439
Commit: 2ff2c0ba6eb99f2c700b4d1f185d63fa71da05fe
Parents: 19bbf44
Author: Yu Li <liyu@apache.org>
Authored: Thu Sep 22 15:43:53 2016 +0800
Committer: Yu Li <liyu@apache.org>
Committed: Thu Sep 22 15:43:53 2016 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java   | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/2ff2c0ba/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 470bf2c..12c21d9 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
@@ -1860,6 +1860,12 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver
{
             param = builder.build();
           }
           offset += paramSize;
+        } else {
+          // currently header must have request param, so we directly throw exception here
+          String msg = "Invalid request header: " + TextFormat.shortDebugString(header)
+              + ", should have param set in it";
+          LOG.warn(msg);
+          throw new DoNotRetryIOException(msg);
         }
         if (header.hasCellBlockMeta()) {
           buf.position(offset);


Mime
View raw message