Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.AbstractIdleService;
import com.google.common.util.concurrent.MoreExecutors;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigException;

Expand Down Expand Up @@ -110,7 +111,7 @@ public FlowCatalog(Config config, GobblinInstanceEnvironment env) {

public FlowCatalog(Config config, Optional<Logger> log, Optional<MetricContext> parentMetricContext, boolean instrumentationEnabled) {
this.log = log.isPresent() ? log.get() : LoggerFactory.getLogger(getClass());
this.listeners = new SpecCatalogListenersList(log);
this.listeners = new SpecCatalogListenersList(Optional.of(MoreExecutors.newDirectExecutorService()), log);
if (instrumentationEnabled) {
MetricContext realParentCtx =
parentMetricContext.or(Instrumented.getMetricContext(new org.apache.gobblin.configuration.State(), getClass()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ public SpecCatalogListenersList() {
}

public SpecCatalogListenersList(Optional<Logger> log) {
_disp = new CallbacksDispatcher<>(Optional.<ExecutorService>absent(), log);
this(Optional.<ExecutorService>absent(), log);
}

public SpecCatalogListenersList(Optional<ExecutorService> executorService, Optional<Logger> log) {
_disp = new CallbacksDispatcher<>(executorService, log);
}

public Logger getLog() {
Expand Down