You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/08/25 23:03:18 UTC

[GitHub] [incubator-pinot] kishoreg commented on a change in pull request #5917: Starts Broker and Server in parallel when using ServiceManager

kishoreg commented on a change in pull request #5917:
URL: https://github.com/apache/incubator-pinot/pull/5917#discussion_r476828802



##########
File path: pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/StartServiceManagerCommand.java
##########
@@ -192,7 +192,20 @@ public boolean execute()
   }
 
   private void startPinotService(Map<String, Object> properties) {
-    startPinotService(ServiceRole.valueOf(properties.get(PINOT_SERVICE_ROLE).toString()), properties);
+    ServiceRole role = ServiceRole.valueOf(properties.get(PINOT_SERVICE_ROLE).toString());
+    switch (role) {
+      // Broker and Server can be started in parallel always
+      case BROKER:
+      case SERVER:
+        new Thread("Starting " + role) {
+          @Override public void run() {
+            startPinotService(role, properties);
+          }
+        }.start();
+        break;
+      default:
+        startPinotService(role, properties);

Review comment:
       Add a log before starting the service and another one after the service is started and measure log the time it took to start

##########
File path: pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/StartServiceManagerCommand.java
##########
@@ -192,7 +192,20 @@ public boolean execute()
   }
 
   private void startPinotService(Map<String, Object> properties) {
-    startPinotService(ServiceRole.valueOf(properties.get(PINOT_SERVICE_ROLE).toString()), properties);
+    ServiceRole role = ServiceRole.valueOf(properties.get(PINOT_SERVICE_ROLE).toString());
+    switch (role) {
+      // Broker and Server can be started in parallel always
+      case BROKER:
+      case SERVER:

Review comment:
       I dont think there is any reason to not add controller. @fx19880617 




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

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



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