smengcl commented on code in PR #3746:
URL: https://github.com/apache/ozone/pull/3746#discussion_r1000895186


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/admin/nssummary/NSSummaryAdmin.java:
##########
@@ -108,6 +110,60 @@ public boolean isFileSystemOptimizedBucket(String path) 
throws IOException {
     }
   }
 
+  public boolean isOBSBucket(String path) throws IOException {
+    OFSPath ofsPath = new OFSPath(path);
+
+    boolean enableFileSystemPaths = getOzoneConfig()
+        .get(OMConfigKeys.OZONE_OM_ENABLE_FILESYSTEM_PATHS).equals("true");

Review Comment:
   Thanks for the change @xBis7 !
   
   Though my bad I just realized we should probably straight use 
`.getBoolean()` with the default value, like this:
   
   
https://github.com/apache/ozone/blob/c0de6bcdebee6a4271fc73ea6542902e0eeee28f/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java#L207-L209
   
   ~~Otherwise when the config key is not explicitly set the `.get()` result 
could be `null`.~~
   Looks like the default value is populated into the config map, so at least 
we won't get NPE. But using `.getBoolean()` could still be the cleaner solution 
so we won't have to worry about the letter case.
   
   This applies here as well: 
https://github.com/apache/ozone/pull/3746#discussion_r998957719



-- 
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]

Reply via email to