Jackie-Jiang commented on a change in pull request #7880:
URL: https://github.com/apache/pinot/pull/7880#discussion_r765345426



##########
File path: 
pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/StartServiceManagerCommand.java
##########
@@ -205,9 +206,9 @@ public boolean execute()
     }
   }
 
-  private String startServiceManager() {
+  private String startServiceManager(boolean bootstrapMode) {

Review comment:
       Do we need this extra flag? Seems the `bootstrapMode` can be derived 
from the `_port`?

##########
File path: 
pinot-tools/src/main/java/org/apache/pinot/tools/service/PinotServiceManager.java
##########
@@ -210,18 +210,24 @@ public boolean stopPinotInstance(ServiceStartable 
instance) {
     }
   }
 
-  public void start() {
-    LOGGER.info("Registering service status handler");
-    ServiceStatus.setServiceStatusCallback(_instanceId, new 
PinotServiceManagerStatusCallback(this));
-
+  public void start(boolean bootstrapMode) {
     if (_port < 0) {
       LOGGER.info("Skip Starting Pinot Service Manager admin application");
     } else {
+      LOGGER.info("Registering service status handler");
+      ServiceStatus.setServiceStatusCallback(_instanceId, new 
PinotServiceManagerStatusCallback(this));
+
       LOGGER.info("Starting Pinot Service Manager admin application on port: 
{}", _port);
       _pinotServiceManagerAdminApplication = new 
PinotServiceManagerAdminApiApplication(this);
       _pinotServiceManagerAdminApplication.start(_port);
     }
-    _isStarted = true;
+    if (!bootstrapMode) {
+      _isStarted = true;

Review comment:
       Should the `_isStarted` tracked for each instance since we can have 
multiple services running under the same service manager

##########
File path: 
pinot-tools/src/main/java/org/apache/pinot/tools/service/PinotServiceManager.java
##########
@@ -210,18 +210,24 @@ public boolean stopPinotInstance(ServiceStartable 
instance) {
     }
   }
 
-  public void start() {
-    LOGGER.info("Registering service status handler");
-    ServiceStatus.setServiceStatusCallback(_instanceId, new 
PinotServiceManagerStatusCallback(this));
-
+  public void start(boolean bootstrapMode) {
     if (_port < 0) {

Review comment:
       Should this be `<=`?




-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to