adoroszlai commented on a change in pull request #551: HDDS-2717. Handle chunk increments in datanode URL: https://github.com/apache/hadoop-ozone/pull/551#discussion_r387603227
########## File path: hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockOutputStream.java ########## @@ -274,13 +271,16 @@ public void writeOnRetry(long len) throws IOException { if (len == 0) { return; } - int count = 0; + if (LOG.isDebugEnabled()) { + LOG.debug("Retrying write length {} for blockID {}", len, blockID); + } Preconditions.checkArgument(len <= streamBufferMaxSize); + int count = 0; while (len > 0) { - long writeLen; - writeLen = Math.min(chunkSize, len); - if (writeLen == chunkSize) { - writeChunk(bufferPool.getBuffer(count)); + ChunkBuffer buffer = bufferPool.getBuffer(count); + long writeLen = Math.min(buffer.position(), len); + if (!buffer.hasRemaining()) { Review comment: > Are we ensuring buffer size will always be equal to chunk size? No, the goal was to make these independent. However, we can get rid of the client-side config for now, and introduce it if/when server-side aggregation for per-chunk layout is implemented. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org