saxenapranav commented on code in PR #6069:
URL: https://github.com/apache/hadoop/pull/6069#discussion_r1325863478


##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java:
##########
@@ -999,6 +1006,8 @@ public AbfsRestOperation read(final String path, final 
long position, final byte
             bufferLength, sasTokenForReuse);
     op.execute(tracingContext);
 
+    verifyCheckSumForRead(buffer, op.getResult());

Review Comment:
   Good that we are taking dataRead from op. But we need to send the offset so 
that array copy take correct bytes.
   
   Probably lets add test for this. We can write 8 MB data and read it
   ```
   inputStream.read(byte_array_8_mb, 8MB);
   ```



##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java:
##########
@@ -761,6 +763,8 @@ public AbfsRestOperation append(final String path, final 
byte[] buffer,
       requestHeaders.add(new AbfsHttpHeader(USER_AGENT, userAgentRetry));
     }
 
+    addCheckSumHeaderForWrite(requestHeaders, buffer);

Review Comment:
   Lets send in the offset and length here as well. Although from 
`AbfsOutputStream`, we are setting offset 0. But in future it may be changed. 
Better to keep a check of that in the calculation of md5.



-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to