Java Code Examples for org.apache.kylin.job.execution.Executable#getParams()
The following examples show how to use
org.apache.kylin.job.execution.Executable#getParams() .
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: ExecutableManagerTest.java From kylin-on-parquet-v2 with Apache License 2.0 | 6 votes |
private static void assertJobEqual(Executable one, Executable another) { assertEquals(one.getClass(), another.getClass()); assertEquals(one.getId(), another.getId()); assertEquals(one.getStatus(), another.getStatus()); assertEquals(one.isRunnable(), another.isRunnable()); assertEquals(one.getOutput(), another.getOutput()); assertTrue((one.getParams() == null && another.getParams() == null) || (one.getParams() != null && another.getParams() != null)); if (one.getParams() != null) { assertEquals(one.getParams().size(), another.getParams().size()); for (String key : one.getParams().keySet()) { assertEquals(one.getParams().get(key), another.getParams().get(key)); } } if (one instanceof ChainedExecutable) { assertTrue(another instanceof ChainedExecutable); List<? extends Executable> onesSubs = ((ChainedExecutable) one).getTasks(); List<? extends Executable> anotherSubs = ((ChainedExecutable) another).getTasks(); assertTrue((onesSubs == null && anotherSubs == null) || (onesSubs != null && anotherSubs != null)); if (onesSubs != null) { assertEquals(onesSubs.size(), anotherSubs.size()); for (int i = 0; i < onesSubs.size(); ++i) { assertJobEqual(onesSubs.get(i), anotherSubs.get(i)); } } } }
Example 2
Source File: ExecutableManagerTest.java From kylin with Apache License 2.0 | 6 votes |
private static void assertJobEqual(Executable one, Executable another) { assertEquals(one.getClass(), another.getClass()); assertEquals(one.getId(), another.getId()); assertEquals(one.getStatus(), another.getStatus()); assertEquals(one.isRunnable(), another.isRunnable()); assertEquals(one.getOutput(), another.getOutput()); assertTrue((one.getParams() == null && another.getParams() == null) || (one.getParams() != null && another.getParams() != null)); if (one.getParams() != null) { assertEquals(one.getParams().size(), another.getParams().size()); for (String key : one.getParams().keySet()) { assertEquals(one.getParams().get(key), another.getParams().get(key)); } } if (one instanceof ChainedExecutable) { assertTrue(another instanceof ChainedExecutable); List<? extends Executable> onesSubs = ((ChainedExecutable) one).getTasks(); List<? extends Executable> anotherSubs = ((ChainedExecutable) another).getTasks(); assertTrue((onesSubs == null && anotherSubs == null) || (onesSubs != null && anotherSubs != null)); if (onesSubs != null) { assertEquals(onesSubs.size(), anotherSubs.size()); for (int i = 0; i < onesSubs.size(); ++i) { assertJobEqual(onesSubs.get(i), anotherSubs.get(i)); } } } }
Example 3
Source File: ExecutableManagerTest.java From Kylin with Apache License 2.0 | 6 votes |
private static void assertJobEqual(Executable one, Executable another) { assertEquals(one.getClass(), another.getClass()); assertEquals(one.getId(), another.getId()); assertEquals(one.getStatus(), another.getStatus()); assertEquals(one.isRunnable(), another.isRunnable()); assertEquals(one.getOutput(), another.getOutput()); assertTrue((one.getParams() == null && another.getParams() == null) || (one.getParams() != null && another.getParams() != null)); if (one.getParams() != null) { assertEquals(one.getParams().size(), another.getParams().size()); for (String key : one.getParams().keySet()) { assertEquals(one.getParams().get(key), another.getParams().get(key)); } } if (one instanceof ChainedExecutable) { assertTrue(another instanceof ChainedExecutable); List<? extends Executable> onesSubs = ((ChainedExecutable) one).getTasks(); List<? extends Executable> anotherSubs = ((ChainedExecutable) another).getTasks(); assertTrue((onesSubs == null && anotherSubs == null) || (onesSubs != null && anotherSubs != null)); if (onesSubs != null) { assertEquals(onesSubs.size(), anotherSubs.size()); for (int i = 0; i < onesSubs.size(); ++i) { assertJobEqual(onesSubs.get(i), anotherSubs.get(i)); } } } }