Apache Beam examples with Scala using official Java API, and it's different from using Scio API.
NOTE: Scala 2.13.1 (lots of changes for collection migration) + Apache Beam
2.15 (certain methods in the examples using master branch are patched via
implicit)
- Minimal Word Count
- Word Count
- Debugging Word Count
- Windowed Word Count
- AutoComplete
- StreamingWordExtract
- TfIdf
- TopWikipediaSessions
- TrafficMaxLaneFlow
- TrafficRoutes
- UserScore
- HourlyTeamScore
- StatefulTeamScore
- LeaderBoard
- GameStats
- BigQueryTornadoes
- CombinePerKeyExamples
- DistinctExample
- FilterExamples
- JoinExamples
- MaxPerKeyExamples
- TriggerExample
- ExampleEchoPipeline
Clean up code formatting, treat warnings as errors and build the Assembly Jar
$ ./gradlew licenseFormatMain spotlessApply assemblyJar
$ ./gradlew exec \
-PmainClass=org.apache.beam.examples.scala.WordCount \
--args='--output=/tmp/wc/wc'
$ ./gradlew execJar \
-PmainClass=org.apache.beam.examples.scala.WordCount \
--args='--output=/tmp/wc/wc --inputFile=/tmp/tagdata.txt'
plugins {}and version properties doesn't work with gradle 5.3.1 that metals was bundled with for bootstrapping- Metals
.jvmoptsand.sbtoptsper workspace doesn't work nicely withcoc.nvim. Have to modify server settings directly
Both of the above changes requires modification for global settings. However,
coc.nvim provide configuration file resolved per workspace. Create .vim
folder with coc-settings.json file for per workspace configuration (point to
latest gradle version + scalafmtConfigPath) without polluting global settings.
{
"languageserver": {
"metals": {
"command": "metals-vim",
"rootPatterns": ["build.sbt", "build.sc", "build.gradle"],
"filetypes": ["scala", "sbt", "gradle"],
"settings": {
"metals": {
"gradleScript": "/usr/bin/gradle or /home/user/.sdkman/...",
"scalafmtConfigPath": "codequality/scalafmt.conf"
}
}
}
}
}
Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0