Word Count Beam example

Background

Apache Beam Get Started Java

Generate Code

mvn archetype:generate \
      -DarchetypeGroupId=org.apache.beam \
      -DarchetypeArtifactId=beam-sdks-java-maven-archetypes-examples \
      -DarchetypeVersion=2.29.0 \
      -DgroupId=org.example \
      -DartifactId=word-count-beam \
      -Dversion="0.1" \
      -Dpackage=org.apache.beam.examples \
      -DinteractiveMode=false

Examples

WordCount.java

MinimalWordCount

DebuggingWordCount

Run Example - WordCount.java

Build

mvn clean compile

Execute

mvn  exec:java -Dexec.mainClass=org.apache.beam.examples.WordCount     \
 -Dexec.args="--inputFile=in/lorem-ipsum.txt --output=out/counts" \
 -Pdirect-runner