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

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

anujmodi2021 commented on code in PR #7765:
URL: https://github.com/apache/hadoop/pull/7765#discussion_r2174789793


##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AbfsConfiguration.java:
##########
@@ -1525,8 +1529,8 @@ void setMaxBackoffIntervalMilliseconds(int 
maxBackoffInterval) {
   }
 
   @VisibleForTesting
-  void setIsNamespaceEnabledAccount(String isNamespaceEnabledAccount) {
-    this.isNamespaceEnabledAccount = isNamespaceEnabledAccount;
+  public void setIsNamespaceEnabledAccount(Trilean isNamespaceEnabledAccount) {

Review Comment:
   We should be setting this value on abfsconfiguration object only when we 
know the exact value. Do we really need this to be Trilean? I think we should 
pass the definitive argument and do the Boolean to Trilean conversion here just 
to make sure that no one accidently sets UNKNOWN here.



##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java:
##########
@@ -443,7 +428,7 @@ private synchronized boolean 
getNamespaceEnabledInformationFromServer(
    */
   @VisibleForTesting
   boolean isNamespaceEnabled() throws TrileanConversionException {
-    return this.isNamespaceEnabled.toBoolean();
+    return abfsConfiguration.getIsNamespaceEnabledAccount().toBoolean();

Review Comment:
   Better to use getter here and other places for abfsconfiguration. This will 
make sure same object is being referred everywhere and can easily be mocked if 
needed in future.





> 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

Reply via email to