bhattmanish98 commented on code in PR #8611:
URL: https://github.com/apache/hadoop/pull/8611#discussion_r3727445495
##########
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:
Good catch. Gated Photon on !getIsNamespaceEnabled() in
applyPhotonRequestHeadersIfEnabled, so HNS accounts never advertise Arrow and
stay on the XML path. Added testAcceptHeaderUnchangedOnHnsAccount and
documented the restriction in blobEndpoint.md.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]