echonesis commented on code in PR #9627:
URL: https://github.com/apache/ozone/pull/9627#discussion_r2688826870


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/ReconControllerModule.java:
##########
@@ -92,8 +92,15 @@ public class ReconControllerModule extends AbstractModule {
   private static final Logger LOG =
       LoggerFactory.getLogger(ReconControllerModule.class);
 
+  private final ReconServer reconServer;
+
+  public ReconControllerModule(ReconServer reconServer) {
+    this.reconServer = reconServer;
+  }
+
   @Override
   protected void configure() {
+    bind(ReconServer.class).toInstance(reconServer);

Review Comment:
   This follows the same pattern as OM and SCM. In OM, the starter user and 
admin information are stored as instance fields in the OzoneManager object 
itself 
(https://github.com/apache/ozone/blob/master/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java#L680-L682).
  Similarly, we store this information in the ReconServer instance and make it 
accessible to other components via Guice. 
   
   Using `bind(ReconServer.class).toInstance(reconServer)` allows other 
components to inject and access the starter user information, just like how OM 
exposes this through its instance methods.



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