hanishakoneru commented on a change in pull request #806: HDDS-1224.
Restructure code to validate the response from server in the Read path
URL: https://github.com/apache/hadoop/pull/806#discussion_r288344456
##########
File path:
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockInputStream.java
##########
@@ -403,6 +360,34 @@ protected ByteString readChunk(final ChunkInfo chunkInfo,
return xceiverClient.getPipeline().getNodes();
}
+ private CheckedFunction<ContainerProtos.ContainerCommandResponseProto,
IOException>
+ validator = (response) -> {
+ ReadChunkResponseProto readChunkResponse;
+ final ChunkInfo chunkInfo = chunks.get(chunkIndex);
Review comment:
The chunkIndex might get updated between the readChunk call and the
validator call.
Also, with HDDS-1496, we are going to support partial chunk reads. So we
would have to somehow let the validator know the chunkIndex, offset and length
which was used in the readChunk call.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]