Search in sources :

Example 1 with DefaultResourceManager

use of org.apache.drill.exec.work.foreman.rm.DefaultResourceManager in project drill by apache.

the class TestRMConfigLoad method testDefaultRMWithLocalCoordinatorAndRMDisabled.

@Test
public void testDefaultRMWithLocalCoordinatorAndRMDisabled() throws Exception {
    ClusterFixtureBuilder fixtureBuilder = ClusterFixture.builder(dirTestWatcher).configProperty(ExecConstants.RM_ENABLED, false);
    try (ClusterFixture cluster = fixtureBuilder.build()) {
        ResourceManager resourceManager = cluster.drillbit().getContext().getResourceManager();
        assertTrue(resourceManager instanceof DefaultResourceManager);
    }
}
Also used : ClusterFixture(org.apache.drill.test.ClusterFixture) DefaultResourceManager(org.apache.drill.exec.work.foreman.rm.DefaultResourceManager) ClusterFixtureBuilder(org.apache.drill.test.ClusterFixtureBuilder) DefaultResourceManager(org.apache.drill.exec.work.foreman.rm.DefaultResourceManager) DistributedResourceManager(org.apache.drill.exec.work.foreman.rm.DistributedResourceManager) ResourceManager(org.apache.drill.exec.work.foreman.rm.ResourceManager) Test(org.junit.Test) ResourceManagerTest(org.apache.drill.categories.ResourceManagerTest) DrillTest(org.apache.drill.test.DrillTest)

Example 2 with DefaultResourceManager

use of org.apache.drill.exec.work.foreman.rm.DefaultResourceManager in project drill by apache.

the class TestRMConfigLoad method testDefaultRMWithLocalCoordinatorAndRMEnabled.

@Test
public void testDefaultRMWithLocalCoordinatorAndRMEnabled() throws Exception {
    ClusterFixtureBuilder fixtureBuilder = ClusterFixture.builder(dirTestWatcher).configProperty(ExecConstants.RM_ENABLED, true);
    try (ClusterFixture cluster = fixtureBuilder.build()) {
        ResourceManager resourceManager = cluster.drillbit().getContext().getResourceManager();
        assertTrue(resourceManager instanceof DefaultResourceManager);
    }
}
Also used : ClusterFixture(org.apache.drill.test.ClusterFixture) DefaultResourceManager(org.apache.drill.exec.work.foreman.rm.DefaultResourceManager) ClusterFixtureBuilder(org.apache.drill.test.ClusterFixtureBuilder) DefaultResourceManager(org.apache.drill.exec.work.foreman.rm.DefaultResourceManager) DistributedResourceManager(org.apache.drill.exec.work.foreman.rm.DistributedResourceManager) ResourceManager(org.apache.drill.exec.work.foreman.rm.ResourceManager) Test(org.junit.Test) ResourceManagerTest(org.apache.drill.categories.ResourceManagerTest) DrillTest(org.apache.drill.test.DrillTest)

Example 3 with DefaultResourceManager

use of org.apache.drill.exec.work.foreman.rm.DefaultResourceManager in project drill by apache.

the class TestRMConfigLoad method testDefaultRMOnlyRMDisabled.

@Test
public void testDefaultRMOnlyRMDisabled() throws Exception {
    ClusterFixtureBuilder fixtureBuilder = ClusterFixture.builder(dirTestWatcher).configProperty(ExecConstants.RM_ENABLED, false).configProperty(ExecConstants.DRILL_PORT_HUNT, true).withLocalZk();
    try (ClusterFixture cluster = fixtureBuilder.build()) {
        ResourceManager resourceManager = cluster.drillbit().getContext().getResourceManager();
        assertTrue(resourceManager instanceof DefaultResourceManager);
    }
}
Also used : ClusterFixture(org.apache.drill.test.ClusterFixture) DefaultResourceManager(org.apache.drill.exec.work.foreman.rm.DefaultResourceManager) ClusterFixtureBuilder(org.apache.drill.test.ClusterFixtureBuilder) DefaultResourceManager(org.apache.drill.exec.work.foreman.rm.DefaultResourceManager) DistributedResourceManager(org.apache.drill.exec.work.foreman.rm.DistributedResourceManager) ResourceManager(org.apache.drill.exec.work.foreman.rm.ResourceManager) Test(org.junit.Test) ResourceManagerTest(org.apache.drill.categories.ResourceManagerTest) DrillTest(org.apache.drill.test.DrillTest)

Aggregations

ResourceManagerTest (org.apache.drill.categories.ResourceManagerTest)3 DefaultResourceManager (org.apache.drill.exec.work.foreman.rm.DefaultResourceManager)3 DistributedResourceManager (org.apache.drill.exec.work.foreman.rm.DistributedResourceManager)3 ResourceManager (org.apache.drill.exec.work.foreman.rm.ResourceManager)3 ClusterFixture (org.apache.drill.test.ClusterFixture)3 ClusterFixtureBuilder (org.apache.drill.test.ClusterFixtureBuilder)3 DrillTest (org.apache.drill.test.DrillTest)3 Test (org.junit.Test)3