xichen01 commented on code in PR #4809:
URL: https://github.com/apache/ozone/pull/4809#discussion_r1213523576


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -642,19 +642,15 @@ private OzoneManager(OzoneConfiguration conf, 
StartupOption startupOption)
     perfMetrics = OMPerformanceMetrics.register();
     // Get admin list
     omStarterUser = UserGroupInformation.getCurrentUser().getShortUserName();
-    Collection<String> omAdminUsernames =
-        OzoneConfigUtil.getOzoneAdminsFromConfig(configuration, omStarterUser);
-    Collection<String> omAdminGroups =
-        OzoneConfigUtil.getOzoneAdminsGroupsFromConfig(configuration);
-    LOG.info("OM start with adminUsers: {}", omAdminUsernames);
-    omAdmins = new OzoneAdmins(omAdminUsernames, omAdminGroups);
+    omAdmins = OzoneAdmins.getOzoneAdmins(omStarterUser, conf);
+    LOG.info("OM start with adminUsers: {}", omAdmins.getAdminUsernames());
 
     // Get read only admin list
     Collection<String> omReadOnlyAdmins =
-        OzoneConfigUtil.getOzoneReadOnlyAdminsFromConfig(
+        OzoneAdmins.getOzoneReadOnlyAdminsFromConfig(
             configuration);
     Collection<String> omReadOnlyAdminsGroups =
-        OzoneConfigUtil.getOzoneReadOnlyAdminsGroupsFromConfig(
+        OzoneAdmins.getOzoneReadOnlyAdminsGroupsFromConfig(
             configuration);
 
     readOnlyAdmins = new OzoneAdmins(omReadOnlyAdmins,

Review Comment:
   @adoroszlai The checkstyle issue has been fixed. You also can merge the 
https://github.com/apache/ozone/pull/4794 first if that is needed. I will 
resolve the conflict.



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -642,19 +642,15 @@ private OzoneManager(OzoneConfiguration conf, 
StartupOption startupOption)
     perfMetrics = OMPerformanceMetrics.register();
     // Get admin list
     omStarterUser = UserGroupInformation.getCurrentUser().getShortUserName();
-    Collection<String> omAdminUsernames =
-        OzoneConfigUtil.getOzoneAdminsFromConfig(configuration, omStarterUser);
-    Collection<String> omAdminGroups =
-        OzoneConfigUtil.getOzoneAdminsGroupsFromConfig(configuration);
-    LOG.info("OM start with adminUsers: {}", omAdminUsernames);
-    omAdmins = new OzoneAdmins(omAdminUsernames, omAdminGroups);
+    omAdmins = OzoneAdmins.getOzoneAdmins(omStarterUser, conf);
+    LOG.info("OM start with adminUsers: {}", omAdmins.getAdminUsernames());
 
     // Get read only admin list
     Collection<String> omReadOnlyAdmins =
-        OzoneConfigUtil.getOzoneReadOnlyAdminsFromConfig(
+        OzoneAdmins.getOzoneReadOnlyAdminsFromConfig(
             configuration);
     Collection<String> omReadOnlyAdminsGroups =
-        OzoneConfigUtil.getOzoneReadOnlyAdminsGroupsFromConfig(
+        OzoneAdmins.getOzoneReadOnlyAdminsGroupsFromConfig(
             configuration);
 
     readOnlyAdmins = new OzoneAdmins(omReadOnlyAdmins,

Review Comment:
   @adoroszlai The checkstyle issue has been fixed. You also can merge the 
https://github.com/apache/ozone/pull/4794 first if that is needed. I will 
resolve the conflict.



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