@Test public void testIllegalState() throws Exception { logger.info("testIllegalState"); DefaultChainedExecutable job = new DefaultChainedExecutable(); BaseTestExecutable task1 = new SucceedTestExecutable(); BaseTestExecutable task2 = new RunningTestExecutable(); job.addTask(task1); job.addTask(task2); execMgr.addJob(job); ExecutableManager.getInstance(KylinConfig.getInstanceFromEnv()).updateJobOutput(task2.getId(), ExecutableState.RUNNING, null, null); waitForJobFinish(job.getId(), MAX_WAIT_TIME); Assert.assertEquals(ExecutableState.ERROR, execMgr.getOutput(job.getId()).getState()); Assert.assertEquals(ExecutableState.SUCCEED, execMgr.getOutput(task1.getId()).getState()); Assert.assertEquals(ExecutableState.ERROR, execMgr.getOutput(task2.getId()).getState()); }
public synchronized static DefaultScheduler getInstance() { if (INSTANCE == null) { INSTANCE = createInstance(); } return INSTANCE; }
DefaultScheduler implements Scheduler<AbstractExecutable> { public synchronized static DefaultScheduler getInstance() { if (INSTANCE == null) { INSTANCE = createInstance(); } return INSTANCE; } }
DefaultScheduler implements Scheduler<AbstractExecutable> { public synchronized static DefaultScheduler getInstance() { if (INSTANCE == null) { INSTANCE = createInstance(); } return INSTANCE; } DefaultScheduler(); }
DefaultScheduler implements Scheduler<AbstractExecutable> { public synchronized static DefaultScheduler getInstance() { if (INSTANCE == null) { INSTANCE = createInstance(); } return INSTANCE; } DefaultScheduler(); synchronized static DefaultScheduler getInstance(); static synchronized DefaultScheduler createInstance(); static synchronized void destroyInstance(); ExecutableManager getExecutableManager(); FetcherRunner getFetcherRunner(); @Override synchronized void init(JobEngineConfig jobEngineConfig, JobLock lock); @Override void shutdown(); @Override boolean hasStarted(); }
DefaultScheduler implements Scheduler<AbstractExecutable> { public synchronized static DefaultScheduler getInstance() { if (INSTANCE == null) { INSTANCE = createInstance(); } return INSTANCE; } DefaultScheduler(); synchronized static DefaultScheduler getInstance(); static synchronized DefaultScheduler createInstance(); static synchronized void destroyInstance(); ExecutableManager getExecutableManager(); FetcherRunner getFetcherRunner(); @Override synchronized void init(JobEngineConfig jobEngineConfig, JobLock lock); @Override void shutdown(); @Override boolean hasStarted();  }