Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dsl.WordCount doesn't print result on a local cluster #2121

Open
manuzhang opened this issue Dec 23, 2018 · 0 comments
Open

dsl.WordCount doesn't print result on a local cluster #2121

manuzhang opened this issue Dec 23, 2018 · 0 comments

Comments

@manuzhang
Copy link
Member

The following application is run on a local cluster and (is,1)(bingo!!,2)(a,1)(good,1)(This,1)(start,,1) is expected in gearpump-local-*.log

    val app = StreamApp("dsl", context)
    val data = "This is a good start, bingo!! bingo!!"
    app.source(data.lines.toList, 1, "source").
      // word => (word, count)
      flatMap(line => line.split("[\\s]+")).map((_, 1)).
      // (word, count1), (word, count2) => (word, count1 + count2)
      groupByKey().sum.map(print)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant