fapifta commented on a change in pull request #2849:
URL: https://github.com/apache/ozone/pull/2849#discussion_r760624863



##########
File path: 
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/ECKeyOutputStream.java
##########
@@ -351,38 +363,27 @@ private void handleOutputStreamWrite(int currIdx, long 
len,
       try {
         // Since it's a fullcell, let's write all content from buffer.
         writeToOutputStream(current, len, bytesToWrite.array(),
-            bytesToWrite.array().length, 0, current.getWrittenDataLength(),
-            isParity);
+            bytesToWrite.array().length, 0, isParity);
       } catch (Exception e) {
         markStreamAsFailed(e);
       }
     }
   }
 
   private int writeToOutputStream(BlockOutputStreamEntry current, long len,
-      byte[] b, int writeLen, int off, long currentPos, boolean isParity)
+      byte[] b, int writeLen, int off, boolean isParity)
       throws IOException {
     try {
       current.write(b, off, writeLen);
       if (!isParity) {
         offset += writeLen;
       }
     } catch (IOException ioe) {
-      // for the current iteration, totalDataWritten - currentPos gives the
-      // amount of data already written to the buffer
-
-      // In the retryPath, the total data to be written will always be equal
-      // to or less than the max length of the buffer allocated.
-      // The len specified here is the combined sum of the data length of
-      // the buffers
-      Preconditions.checkState(len <= config.getStreamBufferMaxSize());
-      int dataWritten = (int) (current.getWrittenDataLength() - currentPos);
-      writeLen = dataWritten;
-
       if (!isParity) {

Review comment:
       thank you, that sounds good.




-- 
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]

Reply via email to