Hi madhairsilence,

1. The default parallelism of a job is set to the number of cpu cores on your 
machine, generally is 4. That means all operators’ (except source operator) 
parallelism is 4. 
    That’s why you get always get 4 files, because there are 4 csv sink tasks. 
You can change the parallelism by `.setParallelism(1)` after `writeAsCsv(…)`.
2. I think it’s a bug in your code. The out list should not be an instance 
variable, but local variable in `select` method.  When the element “3" come in, 
the result of OutpuSelector 
   contains both “even“ and ”odd”, that’s why “3” is printed.

Hope this helps you.

- Jark Wu 

> 在 2017年1月3日,下午7:26,madhairsilence <harish.kum...@tcs.com 
> <mailto:harish.kum...@tcs.com>> 写道:
> 
> fromElements

Reply via email to