You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2018/07/06 00:27:30 UTC

[1/4] hbase git commit: HBASE-20826 Truncate really long RpcServer warnings unless TRACE is on

Repository: hbase
Updated Branches:
  refs/heads/branch-1 d6d1efd89 -> 154b77307
  refs/heads/branch-1.2 3845c089d -> a5c69c8ab
  refs/heads/branch-1.3 0b1a4cf39 -> 341d5688e
  refs/heads/branch-1.4 71a0a3cf0 -> 0d1fffbb4


HBASE-20826 Truncate really long RpcServer warnings unless TRACE is on

Signed-off-by: zhangduo <zh...@apache.org>
Signed-off-by: Ted Yu <ty...@apache.org>
Signed-off-by: Michael Stack <st...@apache.org>


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

Branch: refs/heads/branch-1.4
Commit: 0d1fffbb45ff832ca906d2c8cfa6ed911e8c1562
Parents: 71a0a3c
Author: Josh Elser <el...@apache.org>
Authored: Fri Jun 29 15:19:59 2018 -0400
Committer: Andrew Purtell <ap...@apache.org>
Committed: Thu Jul 5 17:21:18 2018 -0700

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/0d1fffbb/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 bc3b33a..c4c7360 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
@@ -2441,7 +2441,14 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
     responseInfo.put("class", server == null? "": server.getClass().getSimpleName());
     responseInfo.put("method", methodName);
     responseInfo.put("call", call);
-    responseInfo.put("param", ProtobufUtil.getShortTextFormat(param));
+    // The params could be really big, make sure they don't kill us at WARN
+    String stringifiedParam = ProtobufUtil.getShortTextFormat(param);
+    if (stringifiedParam.length() > 150) {
+      // Truncate to 1000 chars if TRACE is on, else to 150 chars
+      stringifiedParam = stringifiedParam.subSequence(
+          0, LOG.isTraceEnabled() ? 1000 : 150) + " <TRUNCATED>";
+    }
+    responseInfo.put("param", stringifiedParam);
     if (param instanceof ClientProtos.ScanRequest && rsRpcServices != null) {
       ClientProtos.ScanRequest request = ((ClientProtos.ScanRequest) param);
       if (request.hasScannerId()) {


[4/4] hbase git commit: HBASE-20826 Truncate really long RpcServer warnings unless TRACE is on

Posted by ap...@apache.org.
HBASE-20826 Truncate really long RpcServer warnings unless TRACE is on

Signed-off-by: zhangduo <zh...@apache.org>
Signed-off-by: Ted Yu <ty...@apache.org>
Signed-off-by: Michael Stack <st...@apache.org>


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

Branch: refs/heads/branch-1.2
Commit: a5c69c8ab44430879dd417043bab0dc86b04063e
Parents: 3845c08
Author: Josh Elser <el...@apache.org>
Authored: Fri Jun 29 15:19:59 2018 -0400
Committer: Andrew Purtell <ap...@apache.org>
Committed: Thu Jul 5 17:22:20 2018 -0700

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/a5c69c8a/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 7137530..4a973c6 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
@@ -2278,7 +2278,14 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
     responseInfo.put("class", server == null? "": server.getClass().getSimpleName());
     responseInfo.put("method", methodName);
     responseInfo.put("call", call);
-    responseInfo.put("param", ProtobufUtil.getShortTextFormat(param));
+    // The params could be really big, make sure they don't kill us at WARN
+    String stringifiedParam = ProtobufUtil.getShortTextFormat(param);
+    if (stringifiedParam.length() > 150) {
+      // Truncate to 1000 chars if TRACE is on, else to 150 chars
+      stringifiedParam = stringifiedParam.subSequence(
+          0, LOG.isTraceEnabled() ? 1000 : 150) + " <TRUNCATED>";
+    }
+    responseInfo.put("param", stringifiedParam);
     if (param instanceof ClientProtos.ScanRequest && rsRpcServices != null) {
       ClientProtos.ScanRequest request = ((ClientProtos.ScanRequest) param);
       if (request.hasScannerId()) {


[2/4] hbase git commit: HBASE-20826 Truncate really long RpcServer warnings unless TRACE is on

Posted by ap...@apache.org.
HBASE-20826 Truncate really long RpcServer warnings unless TRACE is on

Signed-off-by: zhangduo <zh...@apache.org>
Signed-off-by: Ted Yu <ty...@apache.org>
Signed-off-by: Michael Stack <st...@apache.org>


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

Branch: refs/heads/branch-1
Commit: 154b77307fd702f4794213d1713a80516cd3c9bd
Parents: d6d1efd
Author: Josh Elser <el...@apache.org>
Authored: Fri Jun 29 15:19:59 2018 -0400
Committer: Andrew Purtell <ap...@apache.org>
Committed: Thu Jul 5 17:21:30 2018 -0700

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/154b7730/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 bc3b33a..c4c7360 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
@@ -2441,7 +2441,14 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
     responseInfo.put("class", server == null? "": server.getClass().getSimpleName());
     responseInfo.put("method", methodName);
     responseInfo.put("call", call);
-    responseInfo.put("param", ProtobufUtil.getShortTextFormat(param));
+    // The params could be really big, make sure they don't kill us at WARN
+    String stringifiedParam = ProtobufUtil.getShortTextFormat(param);
+    if (stringifiedParam.length() > 150) {
+      // Truncate to 1000 chars if TRACE is on, else to 150 chars
+      stringifiedParam = stringifiedParam.subSequence(
+          0, LOG.isTraceEnabled() ? 1000 : 150) + " <TRUNCATED>";
+    }
+    responseInfo.put("param", stringifiedParam);
     if (param instanceof ClientProtos.ScanRequest && rsRpcServices != null) {
       ClientProtos.ScanRequest request = ((ClientProtos.ScanRequest) param);
       if (request.hasScannerId()) {


[3/4] hbase git commit: HBASE-20826 Truncate really long RpcServer warnings unless TRACE is on

Posted by ap...@apache.org.
HBASE-20826 Truncate really long RpcServer warnings unless TRACE is on

Signed-off-by: zhangduo <zh...@apache.org>
Signed-off-by: Ted Yu <ty...@apache.org>
Signed-off-by: Michael Stack <st...@apache.org>


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

Branch: refs/heads/branch-1.3
Commit: 341d5688e40e02635f7f9a1055b0b6598e8db412
Parents: 0b1a4cf
Author: Josh Elser <el...@apache.org>
Authored: Fri Jun 29 15:19:59 2018 -0400
Committer: Andrew Purtell <ap...@apache.org>
Committed: Thu Jul 5 17:21:40 2018 -0700

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/341d5688/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 ab42538..e320e74 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
@@ -2436,7 +2436,14 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
     responseInfo.put("class", server == null? "": server.getClass().getSimpleName());
     responseInfo.put("method", methodName);
     responseInfo.put("call", call);
-    responseInfo.put("param", ProtobufUtil.getShortTextFormat(param));
+    // The params could be really big, make sure they don't kill us at WARN
+    String stringifiedParam = ProtobufUtil.getShortTextFormat(param);
+    if (stringifiedParam.length() > 150) {
+      // Truncate to 1000 chars if TRACE is on, else to 150 chars
+      stringifiedParam = stringifiedParam.subSequence(
+          0, LOG.isTraceEnabled() ? 1000 : 150) + " <TRUNCATED>";
+    }
+    responseInfo.put("param", stringifiedParam);
     if (param instanceof ClientProtos.ScanRequest && rsRpcServices != null) {
       ClientProtos.ScanRequest request = ((ClientProtos.ScanRequest) param);
       if (request.hasScannerId()) {