[
https://issues.apache.org/jira/browse/HADOOP-19604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18007742#comment-18007742
]
ASF GitHub Bot commented on HADOOP-19604:
-----------------------------------------
anmolanmol1234 commented on code in PR #7777:
URL: https://github.com/apache/hadoop/pull/7777#discussion_r2212611621
##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemChecksum.java:
##########
@@ -61,9 +64,36 @@ public class ITestAzureBlobFileSystemChecksum extends
AbstractAbfsIntegrationTes
private static final int MB_15 = 15 * ONE_MB;
private static final int MB_16 = 16 * ONE_MB;
private static final String INVALID_MD5_TEXT = "Text for Invalid MD5
Computation";
+ private MessageDigest md = null;
public ITestAzureBlobFileSystemChecksum() throws Exception {
super();
+ try {
+ md = MessageDigest.getInstance(MD5);
+ } catch (NoSuchAlgorithmException e) {
+ // MD5 algorithm not available; md will remain null
+ }
+ }
+
+ /**
+ * Computes the MD5 checksum of a specified portion of the input byte array.
+ *
+ * @param data The byte array containing the data to compute the MD5
checksum for.
+ * @param off The starting offset in the byte array.
+ * @param length The number of bytes to include in the checksum computation.
+ * @return The Base64-encoded MD5 checksum of the specified data, or null if
the digest is empty.
+ * @throws IllegalArgumentException If the offset or length is invalid for
the given byte array.
+ */
+ public String getMd5(byte[] data, int off, int length) {
Review Comment:
makes sense, taken
##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestWasbAbfsCompatibility.java:
##########
@@ -42,10 +51,28 @@
* Test compatibility between ABFS client and WASB client.
*/
public class ITestWasbAbfsCompatibility extends AbstractAbfsIntegrationTest {
+
Review Comment:
taken
> 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: [email protected]
For additional commands, e-mail: [email protected]