Last active
March 20, 2019 00:05
-
-
Save kerinin/134858b540f39b5692af632e195d1d1b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Main { | |
def main(args: Array[String]) { | |
val env = StreamExecutionEnvironment.getExecutionEnvironment | |
clicks = env.readFile("myclicks.txt") | |
result = clicks | |
.map(new ClickTransformer) | |
.keyBy(0) | |
.window(EventTimeSessionWindows.withGap(Time.minutes(30L))) | |
.reduce(new ClickReducer) | |
result.writeAsText("output.txt") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment