[ https://issues.apache.org/jira/browse/HADOOP-19604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18003999#comment-18003999 ]
ASF GitHub Bot commented on HADOOP-19604: ----------------------------------------- manika137 commented on code in PR #7777: URL: https://github.com/apache/hadoop/pull/7777#discussion_r2194294234 ########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AzureDFSIngressHandler.java: ########## @@ -178,13 +181,35 @@ protected synchronized AbfsRestOperation remoteFlush(final long offset, tracingContextFlush.setIngressHandler(DFS_FLUSH); tracingContextFlush.setPosition(String.valueOf(offset)); } + byte[] digest = null; + String fullBlobMd5 = null; + try { + // Clone the MessageDigest to avoid resetting the original state + MessageDigest clonedMd5 = (MessageDigest) getAbfsOutputStream().getFullBlobContentMd5().clone(); + digest = clonedMd5.digest(); + } catch (CloneNotSupportedException e) { + LOG.warn("Failed to clone MessageDigest instance", e); + } + if (digest != null && digest.length != 0) { + fullBlobMd5 = Base64.getEncoder().encodeToString(digest); + } Review Comment: Since this code is common in both DFS and Blob ingress handler class, maybe we can add it as a protected helper method in the abstract class AzureIngressHandler? > ABFS: Fix WASB ABFS compatibility issues > ---------------------------------------- > > Key: HADOOP-19604 > URL: https://issues.apache.org/jira/browse/HADOOP-19604 > Project: Hadoop Common > Issue Type: Sub-task > Affects Versions: 3.4.1 > Reporter: Anmol Asrani > Assignee: Anmol Asrani > Priority: Major > Labels: pull-request-available > Fix For: 3.4.1 > > > Fix WASB ABFS compatibility issues. Fix issues such as:- > # BlockId computation to be consistent across clients for PutBlock and > PutBlockList > # Restrict url encoding of certain json metadata during setXAttr calls. > # Maintain the md5 hash of whole block to validate data integrity during > flush. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org