steveloughran commented on code in PR #6069: URL: https://github.com/apache/hadoop/pull/6069#discussion_r1391613074
########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java: ########## @@ -798,6 +806,11 @@ public AbfsRestOperation append(final String path, final byte[] buffer, if (!op.hasResult()) { throw e; } + Review Comment: on the topic of ex parsing, L797 will blow up with a ClassCastException if the exception caught is anything other than a AbfsRestOperationException. so the type of exception caught can be changed to AbfsRestOperationException ########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java: ########## @@ -879,9 +880,8 @@ private boolean checkUserError(int responseStatusCode) { * @return boolean whether exception is due to MD5Mismatch or not */ protected boolean isMd5ChecksumError(final AzureBlobFileSystemException e) { - return ((AbfsRestOperationException) e).getStatusCode() - == HttpURLConnection.HTTP_BAD_REQUEST - && e.getMessage().contains(MD5_ERROR_SERVER_MESSAGE); + AzureServiceErrorCode storageErrorCode = ((AbfsRestOperationException) e).getErrorCode(); Review Comment: see my comment above about making the catch on L787 a AbfsRestOperationException -- 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