Gargi-jais11 commented on code in PR #9783:
URL: https://github.com/apache/ozone/pull/9783#discussion_r2820607717
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/util/PayloadUtils.java:
##########
@@ -52,7 +51,9 @@ public static byte[] generatePayload(int payloadSizeBytes) {
}
public static com.google.protobuf.ByteString generatePayloadProto2(int
payloadSizeBytes) {
- return ProtoUtils.unsafeByteString(generatePayload(payloadSizeBytes));
+ byte[] payload = generatePayload(payloadSizeBytes);
+ return payload.length > 0 ?
com.google.protobuf.UnsafeByteOperations.unsafeWrap(payload)
+ : com.google.protobuf.ByteString.EMPTY;
Review Comment:
Nit: Please add imports for `UnsafeByteOperations` and `ByteString`
--
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]