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

 ##########
 File path: 
pinot-common/src/main/java/org/apache/pinot/common/utils/ServiceStatus.java
 ##########
 @@ -129,56 +132,157 @@ public String getStatusDescription() {
   }
 
   /**
-   * Service status callback that compares ideal state with another Helix 
state. Used to share most of the logic between
-   * the ideal state/external view comparison and ideal state/current state 
comparison.
+   * Service status callback for initializing all other ideal state related 
callbacks
    */
-  private static abstract class IdealStateMatchServiceStatusCallback<T extends 
HelixProperty> implements ServiceStatusCallback {
-    protected final String _clusterName;
-    protected final String _instanceName;
-    protected final HelixAdmin _helixAdmin;
-    protected final HelixDataAccessor _helixDataAccessor;
+  public static class IdealStateServiceStatusCallback implements 
ServiceStatusCallback {
+    private final List<ServiceStatusCallback> _statusCallbacks;
 
-    private final Set<String> _resourcesToMonitor;
-    private final int _numTotalResourcesToMonitor;
-    private Iterator<String> _resourceIterator = null;
-    // Minimum number of resources to be in converged state before we declare 
the service state as STARTED
-    private final int _minResourcesStartCount;
-
-    private String _statusDescription = STATUS_DESCRIPTION_INIT;
+    public IdealStateServiceStatusCallback(HelixManager helixManager, String 
clusterName, String instanceName,
 
 Review comment:
   So, this is a multi-service callback at the same time it is not? I am 
getting confused deciding one way or another.
   
   Another approach could be that we provide a method in serviceStatus that 
gets the resources to be monitored, given the parameters. We have another 
constructor for the individual servicesStatus objects that also takes int he 
resources to be monitored, and HelixBrokerStarter (or server starter) invokes 
that constructor. I think that has two advantages:
   1. It is better readable (or, at least I think so :)
   2. We don't get all idealstates in the broker case. We only get the broker 
ideal state resource!
   

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