hi,

i read a csv file from disk with flink (java, maven version 8.1) and get
the following exception:

ERROR operators.DataSinkTask: Error in user code: Channel received an event
before completing the current partial record.:  DataSink(Print to
System.out) (4/4)
java.lang.IllegalStateException: Channel received an event before
completing the current partial record.
    at
org.apache.flink.runtime.io.network.channels.InputChannel.readRecord(InputChannel.java:158)
    at
org.apache.flink.runtime.io.network.gates.InputGate.readRecord(InputGate.java:176)
    at
org.apache.flink.runtime.io.network.api.MutableRecordReader.next(MutableRecordReader.java:51)
    at
org.apache.flink.runtime.operators.util.ReaderIterator.next(ReaderIterator.java:53)
    at
org.apache.flink.runtime.operators.DataSinkTask.invoke(DataSinkTask.java:170)
    at
org.apache.flink.runtime.execution.RuntimeEnvironment.run(RuntimeEnvironment.java:257)
    at java.lang.Thread.run(Thread.java:745)

my code:

public class FlinkMain {

    public static void main(String[] args) {
        // set up execution environment
        ExecutionEnvironment env =
ExecutionEnvironment.getExecutionEnvironment();
        //env.setDegreeOfParallelism(1);
        // get input points
        DataSet<GeoTimeDataTupel> points = getPointDataSet(env);
        points.print();
        // execute program
        try {
            env.execute("KMeans Flink");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

maybe someone have a solution?

best regards paul

Reply via email to