phet commented on code in PR #3878:
URL: https://github.com/apache/gobblin/pull/3878#discussion_r1489796883


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManagementStateStore.java:
##########
@@ -74,16 +78,10 @@ public interface DagManagementStateStore {
    */
   List<Dag<JobExecutionPlan>> getDags() throws IOException;
 
-  /**
-   * Return a list of all dag IDs contained in the dag state store.
-   */
-  Set<String> getDagIds() throws IOException;
-  Set<String> getFailedDagIds() throws IOException;
-
   /**
    * Initialize with the provided set of dags.
    */
-  void initQuotaManageer(Collection<Dag<JobExecutionPlan>> dags) throws 
IOException;
+  void initQuota(Collection<Dag<JobExecutionPlan>> dags) throws IOException;

Review Comment:
   thinking more on this... 
   
   while I'm not against having a method like this `@VisibleForTesting` or even 
kept around in case the need later arises (e.g. `@Alpha / @Experimental`), 
still, if it's actually used as I expect, which is:
   - at host startup
   - in conjunction w/ the list of `Dag`s retrieved from the same DMSS instance
   
   then let's explore encapsulating the entire interaction.  e.g. a new method 
(`selfInitialize` or `autoInitialize`):
   ```
   void uponStartup() throws IOException {
     initQuota(getAllDags())
   }
   ```
   
   (it's still fine even if the DMSS impl makes `initQuota` into a no-op.)
   
   what I'm pulling for is a clearer conceptual interface for those using this 
interface.  so the `GobblinServiceManager` (or whoever initializes the DMSS 
singleton), would simply invoke:
   ```
   this.dmss.uponStartup();  // just `start()`?
   ```
   
   the way it currently does:
   ```
   this.dagManager.setActive(true);
   ```



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

Reply via email to