You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by gx...@apache.org on 2018/09/12 02:51:50 UTC
hbase git commit: HBASE-21179 Fix the number of actions in
responseTooSlow log
Repository: hbase
Updated Branches:
refs/heads/master 971c9a606 -> 3810ba2c6
HBASE-21179 Fix the number of actions in responseTooSlow log
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/3810ba2c
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/3810ba2c
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/3810ba2c
Branch: refs/heads/master
Commit: 3810ba2c6edfc531181ffc9e6c68396a0c2d2027
Parents: 971c9a6
Author: Guangxu Cheng <gu...@gmail.com>
Authored: Mon Sep 10 20:32:20 2018 +0800
Committer: Guangxu Cheng <gu...@gmail.com>
Committed: Wed Sep 12 10:48:52 2018 +0800
----------------------------------------------------------------------
.../apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/3810ba2c/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java
index 24d2ab7..6548094 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java
@@ -2185,6 +2185,13 @@ public final class ProtobufUtil {
", row=" + getStringForByteString(r.getGet().getRow());
} else if (m instanceof ClientProtos.MultiRequest) {
ClientProtos.MultiRequest r = (ClientProtos.MultiRequest) m;
+
+ // Get the number of Actions
+ int actionsCount = r.getRegionActionList()
+ .stream()
+ .mapToInt(ClientProtos.RegionAction::getActionCount)
+ .sum();
+
// Get first set of Actions.
ClientProtos.RegionAction actions = r.getRegionActionList().get(0);
String row = actions.getActionCount() <= 0? "":
@@ -2192,8 +2199,7 @@ public final class ProtobufUtil {
actions.getAction(0).getGet().getRow():
actions.getAction(0).getMutation().getRow());
return "region= " + getStringForByteString(actions.getRegion().getValue()) +
- ", for " + r.getRegionActionCount() +
- " actions and 1st row key=" + row;
+ ", for " + actionsCount + " action(s) and 1st row key=" + row;
} else if (m instanceof ClientProtos.MutateRequest) {
ClientProtos.MutateRequest r = (ClientProtos.MutateRequest) m;
return "region= " + getStringForByteString(r.getRegion().getValue()) +