I am running WordCount program in Windows using Apache Beam via DirectRunner.I can see the output files getting created in a temp folder(under src/main/resources/).But the write to the output file is getting failed. Below is the code snippet:
p.apply("ReadMyFile", TextIO.read().from("src/main/resources/input.txt"))
.apply(Regex.split(" "))
.apply(Count.<String>perElement())
.apply(ToString.elements())
.apply(TextIO.write().to("src/main/resources/output.txt"));
Please let me know the format it expects for the output directory/file Thanks in advance
Following is the error : Adding Exception:Caused by: java.lang.IllegalStateException: Unable to find registrar for i at org.apache.beam.sdk.io.FileSystems.getFileSystemInternal(FileSystems.java:447) at org.apache.beam.sdk.io.FileSystems.match(FileSystems.java:111) at org.apache.beam.sdk.io.FileSystems.matchResources(FileSystems.java:174) at org.apache.beam.sdk.io.FileSystems.delete(FileSystems.java:321) at org.apache.beam.sdk.io.FileBasedSink$Writer.cleanup(FileBasedSink.java:905) at org.apache.beam.sdk.io.WriteFiles$WriteShardedBundles.processElement(WriteFiles.java:376)