Re: Handle exception for an empty Datastream

2024-04-01 Thread Biao Geng
Hi Nida, The StreamExecutionEnvironment#fromCollection(java.util.Collection data) method will check if the input collection is empty and throw the exception you have met if it is. The 'list != null' cannot get rid of the exception but the ' !list.isEmpty() ' should do the trick. Could you please

Handle exception for an empty Datastream

2024-04-01 Thread Fidea Lidea
Hi Team, I have written a Flink Job which reads data in a List & then converts it to stream. *Example*: public static void main(String[] args) throws Exception { // set up execution environment StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); . . .