Search in sources :

Example 1 with ParallelScheduler

use of org.apache.zeppelin.scheduler.ParallelScheduler in project zeppelin by apache.

the class JDBCInterpreterTest method concurrentSettingTest.

@Test
public void concurrentSettingTest() {
    Properties properties = new Properties();
    properties.setProperty("zeppelin.jdbc.concurrent.use", "true");
    properties.setProperty("zeppelin.jdbc.concurrent.max_connection", "10");
    JDBCInterpreter jdbcInterpreter = new JDBCInterpreter(properties);
    assertTrue(jdbcInterpreter.isConcurrentExecution());
    assertEquals(10, jdbcInterpreter.getMaxConcurrentConnection());
    Scheduler scheduler = jdbcInterpreter.getScheduler();
    assertTrue(scheduler instanceof ParallelScheduler);
    properties.clear();
    properties.setProperty("zeppelin.jdbc.concurrent.use", "false");
    jdbcInterpreter = new JDBCInterpreter(properties);
    assertFalse(jdbcInterpreter.isConcurrentExecution());
    scheduler = jdbcInterpreter.getScheduler();
    assertTrue(scheduler instanceof FIFOScheduler);
}
Also used : ParallelScheduler(org.apache.zeppelin.scheduler.ParallelScheduler) FIFOScheduler(org.apache.zeppelin.scheduler.FIFOScheduler) ParallelScheduler(org.apache.zeppelin.scheduler.ParallelScheduler) FIFOScheduler(org.apache.zeppelin.scheduler.FIFOScheduler) Scheduler(org.apache.zeppelin.scheduler.Scheduler) Properties(java.util.Properties) Test(org.junit.Test)

Aggregations

Properties (java.util.Properties)1 FIFOScheduler (org.apache.zeppelin.scheduler.FIFOScheduler)1 ParallelScheduler (org.apache.zeppelin.scheduler.ParallelScheduler)1 Scheduler (org.apache.zeppelin.scheduler.Scheduler)1 Test (org.junit.Test)1