use of com.facebook.presto.execution.TestEventListenerPlugin.TestingEventListenerPlugin in project presto by prestodb.
the class TestCompletedEventWarnings method setUp.
@BeforeClass
public void setUp() throws Exception {
SessionBuilder sessionBuilder = testSessionBuilder();
generatedEvents = new EventsBuilder();
queryRunner = DistributedQueryRunner.builder(sessionBuilder.build()).setExtraProperties(ImmutableMap.of("testing-warning-collector.preloaded-warnings", String.valueOf(TEST_WARNINGS))).setNodeCount(1).build();
queryRunner.installPlugin(new TestingEventListenerPlugin(generatedEvents));
generatedEvents.initialize(EXPECTED_EVENTS);
}
use of com.facebook.presto.execution.TestEventListenerPlugin.TestingEventListenerPlugin in project presto by prestodb.
the class TestEventListener method setUp.
@BeforeClass
private void setUp() throws Exception {
session = testSessionBuilder().setSystemProperty("task_concurrency", "1").setCatalog("tpch").setSchema("tiny").setClientInfo("{\"clientVersion\":\"testVersion\"}").build();
queryRunner = new DistributedQueryRunner(session, 1);
queryRunner.installPlugin(new TpchPlugin());
queryRunner.installPlugin(new TestingEventListenerPlugin(generatedEvents));
queryRunner.installPlugin(new ResourceGroupManagerPlugin());
queryRunner.createCatalog("tpch", "tpch", ImmutableMap.of("tpch.splits-per-node", Integer.toString(SPLITS_PER_NODE)));
queryRunner.getCoordinator().getResourceGroupManager().get().setConfigurationManager("file", ImmutableMap.of("resource-groups.config-file", getResourceFilePath("resource_groups_config_simple.json")));
}
Aggregations