Search in sources :

Example 1 with SchedulerConfiguration

use of com.linkedin.drelephant.configurations.scheduler.SchedulerConfiguration in project dr-elephant by linkedin.

the class SchedulerConfigurationTest method testParseSchedulerConf1.

/**
 * Correctly configured scheduler
 */
@Test
public void testParseSchedulerConf1() {
    SchedulerConfiguration schedulerConf = new SchedulerConfiguration(document1.getDocumentElement());
    List<SchedulerConfigurationData> schedulerConfData = schedulerConf.getSchedulerConfigurationData();
    assertEquals(schedulerConfData.size(), 2);
    for (SchedulerConfigurationData data : schedulerConfData) {
        if (data.getSchedulerName().equals("airflow")) {
            assertEquals("com.linkedin.drelephant.schedulers.AirflowScheduler", data.getClassName());
            assertEquals("http://localhost:8000", data.getParamMap().get("airflowbaseurl"));
        } else {
            assertEquals("azkaban", data.getSchedulerName());
            assertEquals("com.linkedin.drelephant.schedulers.AzkabanScheduler", data.getClassName());
        }
    }
}
Also used : SchedulerConfiguration(com.linkedin.drelephant.configurations.scheduler.SchedulerConfiguration) SchedulerConfigurationData(com.linkedin.drelephant.configurations.scheduler.SchedulerConfigurationData) Test(org.junit.Test)

Aggregations

SchedulerConfiguration (com.linkedin.drelephant.configurations.scheduler.SchedulerConfiguration)1 SchedulerConfigurationData (com.linkedin.drelephant.configurations.scheduler.SchedulerConfigurationData)1 Test (org.junit.Test)1