use of com.facebook.presto.verifier.source.SourceQueryModule in project presto by prestodb.
the class AbstractVerifyCommand method run.
@Override
public void run() {
if (configFilename != null) {
System.setProperty("config", configFilename);
}
Bootstrap app = new Bootstrap(ImmutableList.<Module>builder().add(new VerifierModule(getSqlParserOptions(), getCustomQueryFilterClasses())).add(new SourceQueryModule(getCustomSourceQuerySupplierTypes())).add(new EventClientModule(getCustomEventClientTypes())).add(new QueryActionsModule(getSqlExceptionClassifier(), getCustomQueryActionTypes())).addAll(getAdditionalModules()).build());
Injector injector = null;
try {
injector = app.initialize();
} catch (Exception e) {
throwIfUnchecked(e);
throw new RuntimeException(e);
} finally {
if (injector != null) {
try {
injector.getInstance(LifeCycleManager.class).stop();
} catch (Exception e) {
log.error(e);
}
}
}
}
Aggregations