Request to provide some pointer on this. Thanks
On Mon, Feb 15, 2016 at 3:39 PM, Ashutosh Kumar <kmr.ashutos...@gmail.com> wrote: > I am getting multiple empty files for streaming output for each interval. > To Avoid this I tried > > kStream.foreachRDD(new VoidFunction2<JavaRDD<String>,Time>(){ > > > > > > *public void call(JavaRDD<String> rdd,Time time) throws Exception { > if(!rdd.isEmpty()){ > rdd.saveAsTextFile("filename_"+time.milliseconds()+".csv"); > } }* > This prevents writing of empty files. However this appends line after one > another by removing new lines. All lines are merged. > How do I retain my new line? > > Thanks > Ashutosh >