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


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagProcArbiterDecorator.java:
##########
@@ -0,0 +1,140 @@
+package org.apache.gobblin.service.modules.orchestration;
+
+
+import java.io.IOException;
+import java.util.Date;
+
+import org.quartz.Job;
+import org.quartz.JobBuilder;
+import org.quartz.JobDataMap;
+import org.quartz.JobDetail;
+import org.quartz.JobExecutionContext;
+import org.quartz.JobExecutionException;
+import org.quartz.SchedulerException;
+import org.quartz.Trigger;
+import org.quartz.TriggerBuilder;
+
+import com.google.common.base.Optional;
+import com.typesafe.config.Config;
+
+import javax.inject.Inject;
+import lombok.extern.slf4j.Slf4j;
+
+import org.apache.gobblin.configuration.ConfigurationKeys;
+import org.apache.gobblin.runtime.api.DagActionStore;
+import org.apache.gobblin.runtime.api.MultiActiveLeaseArbiter;
+import org.apache.gobblin.runtime.api.MysqlMultiActiveLeaseArbiter;
+
+
+/**
+ * Decorator used to coordinate multiple hosts with execution components 
enabled to respond to flow action events. It
+ * uses the {@link MultiActiveLeaseArbiter} to determine a single lease owner 
at a given event time for a flow action
+ * event. After acquiring the lease, the host can pursue executing the action. 
Once it has completed this action, it
+ * marks the lease as completed by calling the
+ * {@link 
MysqlMultiActiveLeaseArbiter#recordLeaseSuccess(MultiActiveLeaseArbiter.LeaseObtainedStatus)}
 method. Hosts
+ * that fail to acquire a lease will use the {@link DagProcReminderScheduler} 
to set a reminder for the flow action
+ * event to check back in on the previous lease owner's completion status.
+ */
+public class DagProcArbiterDecorator extends InstrumentedLeaseArbiterDecorator 
{

Review Comment:
   as mentioned, a Decorator ought to implement the base interface, not extend 
another impl.
   
   thus rather than an inheritance hierarchy wherein each extension delegates 
to `super` within its decoration, apply the decorative behaviors by "stacking" 
the ctor invocations:
   ```
   new DagProcArbiterDecorator(
       new InstrumentedLADecorator(
          new MysqlMALA(...)));
   ```



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