amaliujia commented on code in PR #10694:
URL: https://github.com/apache/ozone/pull/10694#discussion_r3619375675
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/impl/KeyValueStreamDataChannel.java:
##########
@@ -87,6 +105,11 @@ static void writeFully(ByteBuffer b, WriteMethod
writeMethod)
}
}
+ public ContainerCommandRequestProto getPutBlockRequest() {
+ return Objects.requireNonNull(putBlockRequest.get(),
+ () -> "putBlockRequest == null, " + this);
Review Comment:
Looks like no.
Existing code does this already though.
```
void assertOpen() throws IOException {
if (closed.get()) {
throw new IOException("Already closed: " + this);
}
}
```
`getPutBlockRequest` is only be used in a unit test and I think there is no
need for a null check here so removed.
--
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]