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


##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java:
##########
@@ -875,10 +873,15 @@ private boolean checkUserError(int responseStatusCode) {
         && responseStatusCode < HttpURLConnection.HTTP_INTERNAL_ERROR);
   }
 
-  private boolean isMd5ChecksumError(final AzureBlobFileSystemException e) {
+  /**
+   * To check if the failure exception returned by server is due to MD5 
Mismatch
+   * @param e Exception returned by AbfsRestOperation
+   * @return boolean whether exception is due to MD5Mismatch or not
+   */
+  protected boolean isMd5ChecksumError(final AzureBlobFileSystemException e) {
     return ((AbfsRestOperationException) e).getStatusCode()
         == HttpURLConnection.HTTP_BAD_REQUEST
-        && ((AbfsRestOperationException) 
e).getErrorMessage().contains(MD5_ERROR);
+        && e.getMessage().contains(MD5_ERROR_SERVER_MESSAGE);

Review Comment:
   e.getErrorMessage(): The MD5 value specified in the request did not match 
with the MD5 value calculated by the server. 
RequestId:605ff975-001f-0050-5d86-0c16aa000000 Time:2023-11-01T05:43:38.0231383Z
   
   e.getMessage(): Operation failed: "The MD5 value specified in the request 
did not match with the MD5 value calculated by the server.", 400, PUT, 
https://anujtesthns.dfs.core.windows.net/abfs-testcontainer-d887bab1-4bd2-4709-a701-e5dc004fe743/test/testPathbc4069e5d586?action=append&position=0&timeout=90,
 Md5Mismatch, "The MD5 value specified in the request did not match with the 
MD5 value calculated by the server. 
RequestId:605ff975-001f-0050-5d86-0c16aa000000 
Time:2023-11-01T05:43:38.0231383Z"



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