The problem with your code is that you are not using ExecutionEnvironment. The ExecutionEnvironment provides methods to control the job execution and to access the data from other Environment.If you wants to write the data your program is incomplete without using env.execute(); , this will allow to interact with the outside world.
if we create ajar file from ecllipse and run in linux its prints the whole output in single file as expected but in case of windows its creating multiple partitions to store the results.
-output.txt (a folder gets created)
–a (this has some part of output)
–b(this has some part of output)
–c(this has some part of output)
–d(this has some part of output)
ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
DataSet<String> text = env.readTextFile(“C:\\Downloads\\text.txt”);
//do the filter and other functions here