Java Code Examples for org.apache.flink.runtime.operators.ResettableDriver#reset()
The following examples show how to use
org.apache.flink.runtime.operators.ResettableDriver#reset() .
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: AbstractIterativeTask.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
private void reinstantiateDriver() throws Exception { if (this.driver instanceof ResettableDriver) { final ResettableDriver<?, ?> resDriver = (ResettableDriver<?, ?>) this.driver; resDriver.reset(); } else { Class<? extends Driver<S, OT>> driverClass = this.config.getDriver(); this.driver = InstantiationUtil.instantiate(driverClass, Driver.class); try { this.driver.setup(this); } catch (Throwable t) { throw new Exception("The pact driver setup for '" + this.getEnvironment().getTaskInfo().getTaskName() + "' , caused an error: " + t.getMessage(), t); } } }
Example 2
Source File: DriverTestBase.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@SuppressWarnings({"unchecked","rawtypes"}) public void testResettableDriver(ResettableDriver driver, Class stubClass, int iterations) throws Exception { driver.setup(this); for(int i = 0; i < iterations; i++) { if(i == 0) { driver.initialize(); } else { driver.reset(); } testDriver(driver, stubClass); } driver.teardown(); }
Example 3
Source File: UnaryOperatorTestBase.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@SuppressWarnings({"unchecked","rawtypes"}) public void testResettableDriver(ResettableDriver driver, Class stubClass, int iterations) throws Exception { driver.setup(this); for (int i = 0; i < iterations; i++) { if (i == 0) { driver.initialize(); } else { driver.reset(); } testDriver(driver, stubClass); } driver.teardown(); }
Example 4
Source File: BinaryOperatorTestBase.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@SuppressWarnings({"unchecked", "rawtypes"}) public void testResettableDriver(ResettableDriver driver, Class stubClass, int iterations) throws Exception { driver.setup(this); for (int i = 0; i < iterations; i++) { if (i == 0) { driver.initialize(); } else { driver.reset(); } testDriver(driver, stubClass); } driver.teardown(); }
Example 5
Source File: AbstractIterativeTask.java From flink with Apache License 2.0 | 6 votes |
private void reinstantiateDriver() throws Exception { if (this.driver instanceof ResettableDriver) { final ResettableDriver<?, ?> resDriver = (ResettableDriver<?, ?>) this.driver; resDriver.reset(); } else { Class<? extends Driver<S, OT>> driverClass = this.config.getDriver(); this.driver = InstantiationUtil.instantiate(driverClass, Driver.class); try { this.driver.setup(this); } catch (Throwable t) { throw new Exception("The pact driver setup for '" + this.getEnvironment().getTaskInfo().getTaskName() + "' , caused an error: " + t.getMessage(), t); } } }
Example 6
Source File: DriverTestBase.java From flink with Apache License 2.0 | 6 votes |
@SuppressWarnings({"unchecked","rawtypes"}) public void testResettableDriver(ResettableDriver driver, Class stubClass, int iterations) throws Exception { driver.setup(this); for(int i = 0; i < iterations; i++) { if(i == 0) { driver.initialize(); } else { driver.reset(); } testDriver(driver, stubClass); } driver.teardown(); }
Example 7
Source File: UnaryOperatorTestBase.java From flink with Apache License 2.0 | 6 votes |
@SuppressWarnings({"unchecked","rawtypes"}) public void testResettableDriver(ResettableDriver driver, Class stubClass, int iterations) throws Exception { driver.setup(this); for (int i = 0; i < iterations; i++) { if (i == 0) { driver.initialize(); } else { driver.reset(); } testDriver(driver, stubClass); } driver.teardown(); }
Example 8
Source File: BinaryOperatorTestBase.java From flink with Apache License 2.0 | 6 votes |
@SuppressWarnings({"unchecked", "rawtypes"}) public void testResettableDriver(ResettableDriver driver, Class stubClass, int iterations) throws Exception { driver.setup(this); for (int i = 0; i < iterations; i++) { if (i == 0) { driver.initialize(); } else { driver.reset(); } testDriver(driver, stubClass); } driver.teardown(); }
Example 9
Source File: AbstractIterativeTask.java From flink with Apache License 2.0 | 6 votes |
private void reinstantiateDriver() throws Exception { if (this.driver instanceof ResettableDriver) { final ResettableDriver<?, ?> resDriver = (ResettableDriver<?, ?>) this.driver; resDriver.reset(); } else { Class<? extends Driver<S, OT>> driverClass = this.config.getDriver(); this.driver = InstantiationUtil.instantiate(driverClass, Driver.class); try { this.driver.setup(this); } catch (Throwable t) { throw new Exception("The pact driver setup for '" + this.getEnvironment().getTaskInfo().getTaskName() + "' , caused an error: " + t.getMessage(), t); } } }
Example 10
Source File: DriverTestBase.java From flink with Apache License 2.0 | 6 votes |
@SuppressWarnings({"unchecked","rawtypes"}) public void testResettableDriver(ResettableDriver driver, Class stubClass, int iterations) throws Exception { driver.setup(this); for(int i = 0; i < iterations; i++) { if(i == 0) { driver.initialize(); } else { driver.reset(); } testDriver(driver, stubClass); } driver.teardown(); }
Example 11
Source File: UnaryOperatorTestBase.java From flink with Apache License 2.0 | 6 votes |
@SuppressWarnings({"unchecked","rawtypes"}) public void testResettableDriver(ResettableDriver driver, Class stubClass, int iterations) throws Exception { driver.setup(this); for (int i = 0; i < iterations; i++) { if (i == 0) { driver.initialize(); } else { driver.reset(); } testDriver(driver, stubClass); } driver.teardown(); }
Example 12
Source File: BinaryOperatorTestBase.java From flink with Apache License 2.0 | 6 votes |
@SuppressWarnings({"unchecked", "rawtypes"}) public void testResettableDriver(ResettableDriver driver, Class stubClass, int iterations) throws Exception { driver.setup(this); for (int i = 0; i < iterations; i++) { if (i == 0) { driver.initialize(); } else { driver.reset(); } testDriver(driver, stubClass); } driver.teardown(); }