[
https://issues.apache.org/jira/browse/HADOOP-19941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18099426#comment-18099426
]
ASF GitHub Bot commented on HADOOP-19941:
-----------------------------------------
anmolanmol1234 commented on code in PR #8611:
URL: https://github.com/apache/hadoop/pull/8611#discussion_r3656979864
##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsBlobClient.java:
##########
@@ -223,6 +231,31 @@ public List<AbfsHttpHeader>
createDefaultHeaders(ApiVersion xMsVersion) {
return requestHeaders;
}
+ /**
+ * When Photon is enabled, request Apache Arrow responses for ListBlobs by
+ * overriding the Accept header to advertise the Arrow media type with XML as
+ * the fallback format. The service may still return XML (for example when
+ * Photon is not available for the account, namespace or API version), so XML
+ * remains part of the accepted media types and response parsing is driven by
+ * the returned Content-Type. The change is scoped to the ListBlobs path
only.
+ *
+ * @param requestHeaders the request headers to update in place.
+ * @return {@code true} if Arrow (Photon) was requested, {@code false} when
+ * Photon is disabled and the headers were left unchanged.
+ */
+ @VisibleForTesting
+ boolean applyPhotonRequestHeadersIfEnabled(
+ final List<AbfsHttpHeader> requestHeaders) {
Review Comment:
No HNS gating. Service returns 409 Conflict for Arrow listing on HNS
accounts. A 409 never reaches ResponseParserFactory, so Content-Type fallback
can't help — every listing fails hard.
> ABFS: Support Photon (Apache Arrow) based ListBlobs on Blob endpoint with XML
> fallback
> --------------------------------------------------------------------------------------
>
> Key: HADOOP-19941
> URL: https://issues.apache.org/jira/browse/HADOOP-19941
> Project: Hadoop Common
> Issue Type: New Feature
> Components: fs/azure
> Reporter: Manish Bhatt
> Assignee: Manish Bhatt
> Priority: Major
> Labels: pull-request-available
>
> Add config-gated support (fs.azure.photon.enabled, default off) for consuming
> ListBlobs responses in the Apache Arrow (Photon) format on the ABFS Blob
> endpoint. When enabled, ABFS advertises Arrow via an Accept header; the
> response Content-Type selects an Arrow or the existing XML parser, both
> producing identical FileStatus results, so downstream behaviour is unchanged.
> Includes automatic, transparent fallback to XML, full parsing parity
> (metadata, directory markers, implicit directories, copy properties, native
> timestamp/length vectors), interrupt-safe Arrow parsing, and Photon telemetry
> (request, response, fallback, parse-failure counts and listing latency). No
> public API changes. Covered by unit and integration tests.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]