bbeaudreault commented on code in PR #4937:
URL: https://github.com/apache/hbase/pull/4937#discussion_r1082940414
##########
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 do think we should do that, for one from a privacy/memory perspective, and
for another to be consistent with the case where cell block encoding is
enabled. in that case, data won't be in the proto anyway. I don't think the
literal bytes of the request are super useful, and we already have the total
size of the request.
--
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]