Search in sources :

Example 1 with DummyStreamExecutionEnvironment

use of org.apache.flink.table.planner.utils.DummyStreamExecutionEnvironment in project flink by apache.

the class CommonPythonUtil method getRealEnvironment.

private static StreamExecutionEnvironment getRealEnvironment(StreamExecutionEnvironment env) throws NoSuchFieldException, IllegalAccessException {
    Field realExecEnvField = DummyStreamExecutionEnvironment.class.getDeclaredField("realExecEnv");
    realExecEnvField.setAccessible(true);
    while (env instanceof DummyStreamExecutionEnvironment) {
        env = (StreamExecutionEnvironment) realExecEnvField.get(env);
    }
    return env;
}
Also used : Field(java.lang.reflect.Field) DummyStreamExecutionEnvironment(org.apache.flink.table.planner.utils.DummyStreamExecutionEnvironment)

Aggregations

Field (java.lang.reflect.Field)1 DummyStreamExecutionEnvironment (org.apache.flink.table.planner.utils.DummyStreamExecutionEnvironment)1