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

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

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


##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsBlobClient.java:
##########
@@ -1606,10 +1607,7 @@ public Hashtable<String, String> 
getXMSProperties(AbfsHttpOperation result)
   public ListResponseData parseListPathResults(AbfsHttpOperation result, URI 
uri)
       throws AzureBlobFileSystemException {
     BlobListResultSchema listResultSchema;
-    try (InputStream stream = result.getListResultStream()) {
-      if (stream == null) {
-        return null;
-      }
+    try (InputStream stream = new 
ByteArrayInputStream(result.getListResultData())) {

Review Comment:
   Will there be any issue here in case result.getListResultData() is null?



##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsHttpOperation.java:
##########
@@ -438,6 +438,11 @@ final void parseResponse(final byte[] buffer,
             method, getMaskedUrl(), ex.getMessage());
         log.debug("IO Error: ", ex);
         throw ex;
+      } catch (Exception ex) {
+        log.warn("Unexpected error: {} {}: {}",

Review Comment:
   Why do we need both log.warn and log.debug here?



##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsBlobClient.java:
##########
@@ -1620,19 +1618,17 @@ public ListResponseData 
parseListPathResults(AbfsHttpOperation result, URI uri)
         LOG.debug("ListBlobs listed {} blobs with {} as continuation token",
             listResultSchema.paths().size(),
             listResultSchema.getNextMarker());
-      } catch (SAXException | IOException e) {
-        throw new AbfsDriverException(e);
+        return filterDuplicateEntriesAndRenamePendingFiles(listResultSchema, 
uri);
+      } catch (SAXException | IOException ex) {
+        throw new AbfsDriverException(ERR_BLOB_LIST_PARSING, ex);

Review Comment:
   NIT: We can add URI in the error message for better visibility.





> 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