[ https://issues.apache.org/jira/browse/HADOOP-19595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18004226#comment-18004226 ]
ASF GitHub Bot commented on HADOOP-19595: ----------------------------------------- anmolanmol1234 commented on code in PR #7765: URL: https://github.com/apache/hadoop/pull/7765#discussion_r2195592571 ########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java: ########## @@ -392,30 +392,40 @@ public boolean getIsNamespaceEnabled(TracingContext tracingContext) return getNamespaceEnabledInformationFromServer(tracingContext); } + /** + * In case the namespace configuration is not set or invalid, this method will + * make a call to the server to determine if namespace is enabled or not. + * This method is synchronized to ensure that only one thread + * is making the call to the server to determine the namespace + * + * @param tracingContext tracing context + * @return true if namespace is enabled, false otherwise. + * @throws AzureBlobFileSystemException server errors. + */ private synchronized boolean getNamespaceEnabledInformationFromServer( final TracingContext tracingContext) throws AzureBlobFileSystemException { - if (abfsConfiguration.getIsNamespaceEnabledAccount() != Trilean.UNKNOWN) { + if (getAbfsConfiguration().getIsNamespaceEnabledAccount() != Trilean.UNKNOWN) { return isNamespaceEnabled(); } try { LOG.debug("Get root ACL status"); getClient(AbfsServiceType.DFS).getAclStatus(AbfsHttpConstants.ROOT_PATH, tracingContext); // If getAcl succeeds, namespace is enabled. - setNamespaceEnabled(Trilean.TRUE); + setNamespaceEnabled(true); Review Comment: This is optional as you mentioned. > ABFS: AbfsConfiguration should store account type information (HNS or FNS) > -------------------------------------------------------------------------- > > Key: HADOOP-19595 > URL: https://issues.apache.org/jira/browse/HADOOP-19595 > Project: Hadoop Common > Issue Type: Sub-task > Components: fs/azure > Affects Versions: 3.4.1 > Reporter: Manish Bhatt > Assignee: Manish Bhatt > Priority: Major > Labels: pull-request-available > > Currently, both {{AbfsClient}} and {{AzureBlobFileSystemStore}} store > information about whether the account is FNS or HNS (i.e., whether namespace > is enabled). This information should instead be stored at the > {{AbfsConfiguration}} level, allowing both the client and the store to > retrieve it from there when needed. -- 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