org.apache.kylin.job.ErrorTestExecutable Java Examples
The following examples show how to use
org.apache.kylin.job.ErrorTestExecutable.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DefaultSchedulerTest.java From kylin-on-parquet-v2 with Apache License 2.0 | 6 votes |
@Test public void testRetryableException() throws Exception { DefaultChainedExecutable job = new DefaultChainedExecutable(); BaseTestExecutable task = new ErrorTestExecutable(); job.addTask(task); System.setProperty("kylin.job.retry", "3"); //don't retry on DefaultChainedExecutable, only retry on subtasks Assert.assertFalse(job.needRetry(1, new Exception(""))); Assert.assertTrue(task.needRetry(1, new Exception(""))); Assert.assertFalse(task.needRetry(1, null)); Assert.assertFalse(task.needRetry(4, new Exception(""))); System.setProperty("kylin.job.retry-exception-classes", "java.io.FileNotFoundException"); Assert.assertTrue(task.needRetry(1, new FileNotFoundException())); Assert.assertFalse(task.needRetry(1, new Exception(""))); }
Example #2
Source File: DefaultSchedulerTest.java From kylin with Apache License 2.0 | 6 votes |
@Test public void testRetryableException() throws Exception { DefaultChainedExecutable job = new DefaultChainedExecutable(); BaseTestExecutable task = new ErrorTestExecutable(); job.addTask(task); System.setProperty("kylin.job.retry", "3"); //don't retry on DefaultChainedExecutable, only retry on subtasks Assert.assertFalse(job.needRetry(1, new Exception(""))); Assert.assertTrue(task.needRetry(1, new Exception(""))); Assert.assertFalse(task.needRetry(1, null)); Assert.assertFalse(task.needRetry(4, new Exception(""))); System.setProperty("kylin.job.retry-exception-classes", "java.io.FileNotFoundException"); Assert.assertTrue(task.needRetry(1, new FileNotFoundException())); Assert.assertFalse(task.needRetry(1, new Exception(""))); }
Example #3
Source File: DefaultSchedulerTest.java From kylin-on-parquet-v2 with Apache License 2.0 | 5 votes |
@Test public void testSucceedAndError() throws Exception { logger.info("testSucceedAndError"); DefaultChainedExecutable job = new DefaultChainedExecutable(); BaseTestExecutable task1 = new ErrorTestExecutable(); BaseTestExecutable task2 = new SucceedTestExecutable(); job.addTask(task1); job.addTask(task2); execMgr.addJob(job); waitForJobFinish(job.getId(), MAX_WAIT_TIME); Assert.assertEquals(ExecutableState.ERROR, execMgr.getOutput(job.getId()).getState()); Assert.assertEquals(ExecutableState.ERROR, execMgr.getOutput(task1.getId()).getState()); Assert.assertEquals(ExecutableState.READY, execMgr.getOutput(task2.getId()).getState()); }
Example #4
Source File: DefaultSchedulerTest.java From kylin with Apache License 2.0 | 5 votes |
@Test public void testSucceedAndError() throws Exception { logger.info("testSucceedAndError"); DefaultChainedExecutable job = new DefaultChainedExecutable(); BaseTestExecutable task1 = new ErrorTestExecutable(); BaseTestExecutable task2 = new SucceedTestExecutable(); job.addTask(task1); job.addTask(task2); execMgr.addJob(job); waitForJobFinish(job.getId(), MAX_WAIT_TIME); Assert.assertEquals(ExecutableState.ERROR, execMgr.getOutput(job.getId()).getState()); Assert.assertEquals(ExecutableState.ERROR, execMgr.getOutput(task1.getId()).getState()); Assert.assertEquals(ExecutableState.READY, execMgr.getOutput(task2.getId()).getState()); }
Example #5
Source File: DefaultSchedulerTest.java From kylin with Apache License 2.0 | 5 votes |
@Test public void testMetaStoreRecover() throws Exception { logger.info("testMetaStoreRecover"); NoErrorStatusExecutable job = new NoErrorStatusExecutable(); ErrorTestExecutable task = new ErrorTestExecutable(); job.addTask(task); execMgr.addJob(job); Thread.sleep(2500); runningJobToError(job.getId()); waitForJobFinish(job.getId(), MAX_WAIT_TIME); Assert.assertEquals(ExecutableState.ERROR, execMgr.getOutput(job.getId()).getState()); }
Example #6
Source File: DefaultSchedulerTest.java From Kylin with Apache License 2.0 | 5 votes |
@Test public void testSucceedAndError() throws Exception { DefaultChainedExecutable job = new DefaultChainedExecutable(); BaseTestExecutable task1 = new ErrorTestExecutable(); BaseTestExecutable task2 = new SucceedTestExecutable(); job.addTask(task1); job.addTask(task2); jobService.addJob(job); waitForJobFinish(job.getId()); assertEquals(ExecutableState.ERROR, jobService.getOutput(job.getId()).getState()); assertEquals(ExecutableState.ERROR, jobService.getOutput(task1.getId()).getState()); assertEquals(ExecutableState.READY, jobService.getOutput(task2.getId()).getState()); }