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();
. . .
 List<DTO> list=processData( );
  DataStream<DTO> orderA = env.fromCollection(list);
  . . . .
  env.execute("Job");
  }

If *list* is empty then code throws below exception on Flink UI & does not
execute the Job. How can I handle this?
I've tried using list != null or list ! = isEmpty() checks. But it
didn't work. Request to provide suggestions.

*Exception : *

[image: image.png]

Thanks  & Regards
Nida

Reply via email to