bharatviswa504 commented on a change in pull request #804: HDDS-1496. Support
partial chunk reads and checksum verification
URL: https://github.com/apache/hadoop/pull/804#discussion_r290949158
##########
File path:
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockInputStream.java
##########
@@ -115,8 +116,13 @@ public BlockInputStream(BlockID blockId, long blockLen,
Pipeline pipeline,
*/
public synchronized void initialize() throws IOException {
- List<ChunkInfo> chunks = getChunkInfos();
+ // Pre-check that the stream has not been intialized already
+ if (initialized) {
+ return;
+ }
+ Preconditions.checkArgument(chunkOffsets == null);
Review comment:
Do we need this Precondition check?
----------------------------------------------------------------
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]