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

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

anujmodi2021 commented on code in PR #7582:
URL: https://github.com/apache/hadoop/pull/7582#discussion_r2031189514


##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemListStatus.java:
##########
@@ -176,6 +183,31 @@ public void testListPathTracingContext() throws Exception {
     Mockito.verify(spiedTracingContext, times(0)).constructHeader(any(), 
any(), any());
   }
 
+  @Test
+  public void testListPathParsingFailure() throws Exception {
+    assumeBlobServiceType();
+    AzureBlobFileSystem spiedFs = Mockito.spy(getFileSystem());
+    AzureBlobFileSystemStore spiedStore = Mockito.spy(spiedFs.getAbfsStore());
+    AbfsBlobClient spiedClient = Mockito.spy(spiedStore.getClientHandler()
+        .getBlobClient());
+    Mockito.doReturn(spiedStore).when(spiedFs).getAbfsStore();
+    Mockito.doReturn(spiedClient).when(spiedStore).getClient();
+
+    Mockito.doThrow(new 
SocketException(CONNECTION_RESET_MESSAGE)).when(spiedClient).filterDuplicateEntriesAndRenamePendingFiles(any(),
 any());

Review Comment:
   This particular test is to make sure retry does not happen as here exception 
is injected in parsing list result from local stream.
   
   I have modified the test `testListPathTracingContext` to assert that 
exception thrown within httpOperation.processResponse() is retried.





> ABFS: [FnsOverBlob] Streaming List Path Result Should Happen Inside Retry Loop
> ------------------------------------------------------------------------------
>
>                 Key: HADOOP-19531
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19531
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/azure
>    Affects Versions: 3.5.0, 3.4.1
>            Reporter: Anuj Modi
>            Assignee: Anuj Modi
>            Priority: Major
>              Labels: pull-request-available
>
> Listing APIs on both DFS and Blob Endpoints return response as part of 
> response body and has to be read from an Socket Input Stream.
> Any network error occuring while reading the stream should be retried.
> Today, this parsing happens in client and such errors are not retried.
> This change fixes this behavior



--
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

Reply via email to