rmdmattingly commented on code in PR #4937:
URL: https://github.com/apache/hbase/pull/4937#discussion_r1063945937


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/namequeues/impl/SlowLogQueueService.java:
##########
@@ -151,15 +156,30 @@ public void consumeEventFromDisruptor(NamedQueuePayload 
namedQueuePayload) {
     final String userName = 
rpcCall.getRequestUserName().orElse(StringUtils.EMPTY);
     final String methodDescriptorName =
       methodDescriptor != null ? methodDescriptor.getName() : 
StringUtils.EMPTY;
-    TooSlowLog.SlowLogPayload slowLogPayload = 
TooSlowLog.SlowLogPayload.newBuilder()
+    TooSlowLog.SlowLogPayload.Builder slowLogPayloadBuilder = 
TooSlowLog.SlowLogPayload.newBuilder()
       .setCallDetails(methodDescriptorName + "(" + param.getClass().getName() 
+ ")")
       
.setClientAddress(clientAddress).setMethodName(methodDescriptorName).setMultiGets(numGets)
       .setMultiMutations(numMutations).setMultiServiceCalls(numServiceCalls)
       .setParam(slowLogParams != null ? slowLogParams.getParams() : 
StringUtils.EMPTY)
       .setProcessingTime(processingTime).setQueueTime(qTime)
       .setRegionName(slowLogParams != null ? slowLogParams.getRegionName() : 
StringUtils.EMPTY)
       
.setResponseSize(responseSize).setServerClass(className).setStartTime(startTime).setType(type)
-      .setUserName(userName).build();
+      .setUserName(userName);
+    if (slowLogParams != null) {
+      if (slowLogParams.getScan() != null) {
+        slowLogPayloadBuilder.setScan(slowLogParams.getScan());
+      }
+      if (slowLogParams.getMulti() != null) {
+        slowLogPayloadBuilder.setMulti(slowLogParams.getMulti());
+      }
+      if (slowLogParams.getGet() != null) {
+        slowLogPayloadBuilder.setGet(slowLogParams.getGet());
+      }
+      if (slowLogParams.getMutate() != null) {
+        slowLogPayloadBuilder.setMutate(slowLogParams.getMutate());

Review Comment:
   I'm open to removing the values from these mutations (and multiputs) so that 
we're less likely to have huge requests in memory



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to