use of com.facebook.presto.resourceGroups.FileResourceGroupConfigurationManagerFactory in project presto by prestodb.
the class TestClusterStatsResource method setup.
@BeforeClass
public void setup() throws Exception {
client = new JettyHttpClient();
DistributedQueryRunner runner = createQueryRunner(ImmutableMap.of("query.client.timeout", "20s"));
server = runner.getCoordinator();
server.getResourceGroupManager().get().addConfigurationManagerFactory(new FileResourceGroupConfigurationManagerFactory());
server.getResourceGroupManager().get().setConfigurationManager("file", ImmutableMap.of("resource-groups.config-file", getResourceFilePath("resource_groups_config_simple.json")));
}
use of com.facebook.presto.resourceGroups.FileResourceGroupConfigurationManagerFactory in project presto by prestodb.
the class TestQueryManager method setUp.
@BeforeClass
public void setUp() throws Exception {
queryRunner = TpchQueryRunnerBuilder.builder().build();
TestingPrestoServer server = queryRunner.getCoordinator();
server.getResourceGroupManager().get().addConfigurationManagerFactory(new FileResourceGroupConfigurationManagerFactory());
server.getResourceGroupManager().get().setConfigurationManager("file", ImmutableMap.of("resource-groups.config-file", getResourceFilePath("resource_groups_config_simple.json")));
}
use of com.facebook.presto.resourceGroups.FileResourceGroupConfigurationManagerFactory in project presto by prestodb.
the class TestDistributedClusterStatsResource method setup.
@BeforeClass
public void setup() throws Exception {
client = new JettyHttpClient();
DistributedQueryRunner runner = createQueryRunner(ImmutableMap.of("resource-manager.query-expiration-timeout", "4m", "resource-manager.completed-query-expiration-timeout", "4m"), ImmutableMap.of("query.client.timeout", "20s", "resource-manager.query-heartbeat-interval", "100ms", "resource-group-runtimeinfo-refresh-interval", "100ms", "concurrency-threshold-to-enable-resource-group-refresh", "0.1"), ImmutableMap.of(), COORDINATOR_COUNT);
coordinator1 = runner.getCoordinator(0);
coordinator2 = runner.getCoordinator(1);
Optional<TestingPrestoServer> resourceManager = runner.getResourceManager();
checkState(resourceManager.isPresent(), "resource manager not present");
this.resourceManager = resourceManager.get();
runner.getCoordinators().stream().forEach(coordinator -> {
coordinator.getResourceGroupManager().get().addConfigurationManagerFactory(new FileResourceGroupConfigurationManagerFactory());
coordinator.getResourceGroupManager().get().setConfigurationManager("file", ImmutableMap.of("resource-groups.config-file", getResourceFilePath(RESOURCE_GROUPS_CONFIG_FILE)));
});
}
use of com.facebook.presto.resourceGroups.FileResourceGroupConfigurationManagerFactory in project presto by prestodb.
the class TestQueryResource method setup.
@BeforeClass
public void setup() throws Exception {
client = new JettyHttpClient();
DistributedQueryRunner runner = createQueryRunner(ImmutableMap.of("query.client.timeout", "10s"));
server = runner.getCoordinator();
server.getResourceGroupManager().get().addConfigurationManagerFactory(new FileResourceGroupConfigurationManagerFactory());
server.getResourceGroupManager().get().setConfigurationManager("file", ImmutableMap.of("resource-groups.config-file", getResourceFilePath("resource_groups_config_simple.json")));
}
use of com.facebook.presto.resourceGroups.FileResourceGroupConfigurationManagerFactory in project presto by prestodb.
the class TestResourceGroupPerQueryLimitEnforcement method setUp.
@BeforeClass
public void setUp() throws Exception {
queryRunner = TpchQueryRunnerBuilder.builder().build();
TestingPrestoServer server = queryRunner.getCoordinator();
server.getResourceGroupManager().get().addConfigurationManagerFactory(new FileResourceGroupConfigurationManagerFactory());
server.getResourceGroupManager().get().setConfigurationManager("file", ImmutableMap.of("resource-groups.config-file", getResourceFilePath("resource_groups_config_simple.json")));
}
Aggregations