Icon made by Flat Icons from www.flaticon.com
Kio is a set of Kotlin extensions for Apache Beam to implement fluent-like API for Java SDK.
// Create Kio context
val kio = Kio.fromArguments(args)
// Configure a pipeline
kio.read().text("~/input.txt")
.map { it.toLowerCase() }
.flatMap { it.split("\\W+".toRegex()) }
.filter { it.isNotEmpty() }
.countByValue()
.forEach { println(it) }
// And execute it
kio.execute().waitUntilDone()
For more information about Kio, please see the documentation in the docs
directory or here: https://code.chermenin.ru/kio.
Copyright © 2020 Alex Chermenin
Licensed under the Apache License, Version 2.0: https://www.apache.org/licenses/LICENSE-2.0.txt