[ 
https://issues.apache.org/jira/browse/HADOOP-19946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18141907#comment-18141907
 ] 

ASF GitHub Bot commented on HADOOP-19946:
-----------------------------------------

anmolanmol1234 commented on code in PR #8830:
URL: https://github.com/apache/hadoop/pull/8830#discussion_r4523868287


##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/ITestAbfsInputStreamSmallFileReads.java:
##########
@@ -97,11 +99,18 @@ private void validateNumBackendCalls(final boolean 
readSmallFilesCompletely,
         long requestsMadeAfterTest = metricMap
             .get(CONNECTIONS_MADE.getStatName());
 
+        long expected;
         if (readSmallFilesCompletely) {
-          assertEquals(1, requestsMadeAfterTest - requestsMadeBeforeTest);
+          expected = 1;
         } else {
-          assertEquals(3, requestsMadeAfterTest - requestsMadeBeforeTest);
+          expected = 3;
         }
+        Assertions.assertThat(requestsMadeAfterTest - requestsMadeBeforeTest)
+            .describedAs(
+                "Number of calls made will be equal to expected if "
+                    + "data layout is already present else greater than 1 if 
call to "
+                    + "fetch data layout is made")
+            .isIn(Arrays.asList(expected, expected + 1));

Review Comment:
   This now accepts either `expected` or `expected + 1` backend calls, so an 
unrelated extra request would pass unnoticed. Can we keep the original exact 
count for the non-layout calls and assert the GetBlobLayout call count 
separately, or disable data locality in this test? That way a real 
extra-request regression is still caught.





> ABFS: Enable data locality aware reads for Azure Blob Storage
> -------------------------------------------------------------
>
>                 Key: HADOOP-19946
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19946
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs/azure
>            Reporter: Manish Bhatt
>            Assignee: Manish Bhatt
>            Priority: Major
>              Labels: pull-request-available
>
> Introduce data locality support in ABFS to improve read performance for Azure 
> Blob Storage by routing read requests to the endpoint that hosts the required 
> data range. The goal is to reduce latency, improve throughput, and make read 
> operations more efficient for large files and distributed workloads. This 
> work adds blob layout discovery, range-to-endpoint mapping, locality-aware 
> range selection, and caching of layout metadata to avoid repeated lookups. It 
> also enables segmented read-ahead aligned with locality boundaries and adds 
> safeguards for concurrency, eviction, timeout handling, and failure 
> propagation needed for reliable production-scale reads.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to