anmolanmol1234 commented on code in PR #7777:
URL: https://github.com/apache/hadoop/pull/7777#discussion_r2194769475
##########
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:
taken
--
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]