use of org.apache.flink.runtime.operators.Driver in project flink by apache.
the class AbstractIterativeTask method reinstantiateDriver.
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);
}
}
}
Aggregations