Search in sources :

Example 1 with UdfOperator

use of org.apache.flink.api.java.operators.UdfOperator in project flink by apache.

the class PythonPlanBinder method createBroadcastVariable.

private void createBroadcastVariable(PythonOperationInfo info) throws IOException {
    UdfOperator<?> op1 = (UdfOperator) sets.get(info.parentID);
    DataSet<?> op2 = (DataSet) sets.get(info.otherID);
    op1.withBroadcastSet(op2, info.name);
    Configuration c = op1.getParameters();
    if (c == null) {
        c = new Configuration();
    }
    int count = c.getInteger(PLANBINDER_CONFIG_BCVAR_COUNT, 0);
    c.setInteger(PLANBINDER_CONFIG_BCVAR_COUNT, count + 1);
    c.setString(PLANBINDER_CONFIG_BCVAR_NAME_PREFIX + count, info.name);
    op1.withParameters(c);
}
Also used : UdfOperator(org.apache.flink.api.java.operators.UdfOperator) Configuration(org.apache.flink.configuration.Configuration) GlobalConfiguration(org.apache.flink.configuration.GlobalConfiguration) DataSet(org.apache.flink.api.java.DataSet) DatasizeHint(org.apache.flink.python.api.PythonOperationInfo.DatasizeHint)

Aggregations

DataSet (org.apache.flink.api.java.DataSet)1 UdfOperator (org.apache.flink.api.java.operators.UdfOperator)1 Configuration (org.apache.flink.configuration.Configuration)1 GlobalConfiguration (org.apache.flink.configuration.GlobalConfiguration)1 DatasizeHint (org.apache.flink.python.api.PythonOperationInfo.DatasizeHint)1