adoroszlai commented on code in PR #4350:
URL: https://github.com/apache/ozone/pull/4350#discussion_r1126991014
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/ContainerUtils.java:
##########
@@ -79,16 +79,18 @@ private ContainerUtils() {
public static ContainerCommandResponseProto logAndReturnError(
Logger log, StorageContainerException ex,
ContainerCommandRequestProto request) {
- String logInfo = "Operation: {} , Trace ID: {} , Message: {} , " +
- "Result: {} , StorageContainerException Occurred.";
+ String logInfo = "Operation: {} , Trace ID: {} , Block ID: {} , " +
+ "Message: {} , Result: {} , StorageContainerException Occurred.";
if (ex.getResult() == CLOSED_CONTAINER_IO ||
ex.getResult() == CONTAINER_NOT_OPEN) {
if (log.isDebugEnabled()) {
log.debug(logInfo, request.getCmdType(), request.getTraceID(),
+ request.getGetBlock().getBlockID(),
ex.getMessage(), ex.getResult().getValueDescriptor().getName(),
ex);
}
} else {
- log.info(logInfo, request.getCmdType(), request.getTraceID(),
+ log.warn(logInfo, request.getCmdType(), request.getTraceID(),
+ request.getGetBlock().getBlockID(),
Review Comment:
`request.getGetBlock()` will be `null` for most types of requests, resulting
in NPE.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]