[
https://issues.apache.org/jira/browse/HADOOP-19187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17869594#comment-17869594
]
ASF GitHub Bot commented on HADOOP-19187:
-----------------------------------------
anujmodi2021 commented on code in PR #6879:
URL: https://github.com/apache/hadoop/pull/6879#discussion_r1696680906
##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystem.java:
##########
@@ -213,6 +217,23 @@ public void initialize(URI uri, Configuration
configuration)
TracingContext tracingContext = new TracingContext(clientCorrelationId,
fileSystemId, FSOperationType.CREATE_FILESYSTEM,
tracingHeaderFormat, listener);
+
+ /*
+ * Validate the service type configured in the URI is valid for account
type used.
+ * HNS Account Cannot have Blob Endpoint URI.
+ */
+ try {
+ abfsConfiguration.validateConfiguredServiceType(
+ tryGetIsNamespaceEnabled(new TracingContext(tracingContext)));
+ } catch (InvalidConfigurationValueException ex) {
+ LOG.debug("File system configured with Invalid Service Type", ex);
+ throw ex;
+ } catch (AzureBlobFileSystemException ex) {
+ LOG.debug("Enable to determine account type for service type
validation", ex);
Review Comment:
Thanks for the suggestion, Added the test
`testFileSystemInitFailsIfNotAbleToDetermineAccountType` in class
ITestAzureBlobFileSystemInitAndCreate
> ABFS: [FnsOverBlob]Making AbfsClient Abstract for supporting both DFS and
> Blob Endpoint
> ---------------------------------------------------------------------------------------
>
> Key: HADOOP-19187
> URL: https://issues.apache.org/jira/browse/HADOOP-19187
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/azure
> Affects Versions: 3.4.0
> Reporter: Anuj Modi
> Assignee: Anuj Modi
> Priority: Major
> Labels: pull-request-available
>
> Azure Services support two different set of APIs.
> Blob:
> [https://learn.microsoft.com/en-us/rest/api/storageservices/blob-service-rest-api]
>
> DFS:
> [https://learn.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/operation-groups]
>
> As per the plan in HADOOP-19179, this task enables ABFS Driver to work with
> both set of APIs as per the requirement.
> Scope of this task is to refactor the ABfsClient so that ABFSStore can choose
> to interact with the client it wants based on the endpoint configured by user.
> The blob endpoint support will remain "Unsupported" until the whole code is
> checked-in and well tested.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]