From 61a06e433c8a85e2517e11703c425f30f9b65918 Mon Sep 17 00:00:00 2001 From: Ray Mattingly Date: Tue, 24 Oct 2023 10:25:31 -0400 Subject: [PATCH] HBASE-28017 Set request and response size metrics in NettyRpcDuplexHandler (#5473) Co-authored-by: Ray Mattingly Signed-off-by: Duo Zhang Signed-off-by: Bryan Beaudreault --- .../java/org/apache/hadoop/hbase/ipc/NettyRpcDuplexHandler.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcDuplexHandler.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcDuplexHandler.java index 47b0b29a5c6e..ad8c51568a32 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcDuplexHandler.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcDuplexHandler.java @@ -110,6 +110,7 @@ private void writeRequest(ChannelHandlerContext ctx, Call call, ChannelPromise p } else { ctx.write(buf, promise); } + call.callStats.setRequestSizeBytes(totalSize); } } @@ -193,6 +194,7 @@ private void readResponse(ChannelHandlerContext ctx, ByteBuf buf) throws IOExcep } return; } + call.callStats.setResponseSizeBytes(totalSize); if (remoteExc != null) { call.setException(remoteExc); return;