Search in sources :

Example 1 with Driver

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);
        }
    }
}
Also used : Driver(org.apache.flink.runtime.operators.Driver) ResettableDriver(org.apache.flink.runtime.operators.ResettableDriver) ResettableDriver(org.apache.flink.runtime.operators.ResettableDriver) IOException(java.io.IOException)

Aggregations

IOException (java.io.IOException)1 Driver (org.apache.flink.runtime.operators.Driver)1 ResettableDriver (org.apache.flink.runtime.operators.ResettableDriver)1