Skip to content

Commit

Permalink
[GOBBLIN-1768] Fix constructor in KafkaJobStatusMonitorFactory so tha…
Browse files Browse the repository at this point in the history
…t it can be injected (#3628)
  • Loading branch information
Will-Lo authored Jan 23, 2023
1 parent a1be38b commit 3dd0657
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.apache.gobblin.configuration.ConfigurationKeys;
import org.apache.gobblin.kafka.schemareg.KafkaSchemaRegistryConfigurationKeys;
import org.apache.gobblin.metrics.kafka.KafkaAvroSchemaRegistry;
import org.apache.gobblin.runtime.api.GobblinInstanceEnvironment;
import org.apache.gobblin.runtime.troubleshooter.JobIssueEventHandler;
import org.apache.gobblin.runtime.troubleshooter.MultiContextIssueRepository;
import org.apache.gobblin.util.ConfigUtils;
Expand All @@ -50,6 +51,11 @@ public class KafkaJobStatusMonitorFactory implements Provider<KafkaJobStatusMoni
private final boolean instrumentationEnabled;

@Inject
public KafkaJobStatusMonitorFactory(Config config, JobIssueEventHandler jobIssueEventHandler, MultiContextIssueRepository issueRepository,
GobblinInstanceEnvironment env) {
this(config, jobIssueEventHandler, issueRepository, env.isInstrumentationEnabled());
}

public KafkaJobStatusMonitorFactory(Config config, JobIssueEventHandler jobIssueEventHandler, MultiContextIssueRepository issueRepository,
boolean instrumentationEnabled) {
this.config = Objects.requireNonNull(config);
Expand Down

0 comments on commit 3dd0657

Please sign in to comment.