phet commented on code in PR #3865:
URL: https://github.com/apache/gobblin/pull/3865#discussion_r1483796343
##########
gobblin-temporal/src/main/java/org/apache/gobblin/temporal/ddm/NoWorkunitsInfiniteSource.java:
##########
@@ -0,0 +1,83 @@
+package org.apache.gobblin.temporal.ddm;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.List;
+
+import com.google.common.eventbus.EventBus;
+
+import lombok.extern.slf4j.Slf4j;
+
+import org.apache.gobblin.configuration.SourceState;
+import org.apache.gobblin.configuration.WorkUnitState;
+import org.apache.gobblin.instrumented.extractor.InstrumentedExtractor;
+import org.apache.gobblin.source.InfiniteSource;
+import org.apache.gobblin.source.extractor.DataRecordException;
+import org.apache.gobblin.source.extractor.Extractor;
+import org.apache.gobblin.source.workunit.WorkUnit;
+import org.apache.gobblin.stream.RecordEnvelope;
+
+
+/**
+ * An implementation of {@link InfiniteSource} that does not generate any
workunits. This is helpful when the {@link io.temporal.workflow.Workflow}
+ * is driven by the job launcher and not the source. I.e. we want the
discovery to be triggered on a {@link io.temporal.worker.Worker} and not the
+ * {@link org.apache.gobblin.temporal.cluster.GobblinTemporalClusterManager}
+ *
+ * This class also implements the {@link InfiniteSource} to provide hooks for
communicating with the
+ * {@link org.apache.gobblin.temporal.joblauncher.GobblinTemporalJobLauncher}
via the {@link EventBus}.
+ */
+@Slf4j
+public class NoWorkunitsInfiniteSource implements InfiniteSource {
+
+ private final EventBus eventBus = new
EventBus(this.getClass().getSimpleName());
+
+ public NoWorkunitsInfiniteSource() {
+ }
Review Comment:
FYI, equiv default ctor should be created for you
--
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]