mcvsubbu commented on a change in pull request #4218: Add 
RealtimeConsumptionCatchupServiceCallback
URL: https://github.com/apache/incubator-pinot/pull/4218#discussion_r289082518
 
 

 ##########
 File path: 
pinot-broker/src/main/java/org/apache/pinot/broker/broker/helix/HelixBrokerStarter.java
 ##########
 @@ -237,16 +238,30 @@ public void start()
         .addPreConnectCallback(() -> 
brokerMetrics.addMeteredGlobalValue(BrokerMeter.HELIX_ZOOKEEPER_RECONNECTS, 
1L));
 
     // Register the service status handler
-    LOGGER.info("Registering service status handler");
+    registerServiceStatusHandler();
+
+    LOGGER.info("Finish starting Pinot broker");
+  }
+
+  /**
+   * Fetches the resources to monitor and registers the {@link 
org.apache.pinot.common.utils.ServiceStatus.ServiceStatusCallback}s
+   */
+  private void registerServiceStatusHandler() {
+    List<String> resourcesToMonitor = new ArrayList<>(1);
+    IdealState resourceIdealState = 
_helixAdmin.getResourceIdealState(_clusterName, Helix.BROKER_RESOURCE_INSTANCE);
+    if (resourceIdealState != null && resourceIdealState.isEnabled()) {
 
 Review comment:
   If each service handler we want to have end up being empty, then yes. we do 
need to set one that always returns GOOD. Perhaps that can be the default 
setting for ServiceStatus.getServiceStatus ?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to