wilkyred
wilkyred

Reputation: 33

Why doesn't the Flink SocketTextStreamWordCount work?

I've set up the example project and built it. I'm able to run the WordCount program as expected. But when I run the SocketTextWordCount, I'm not getting any results printed out.

But I never see the counts.print() output printed out anywhere, even after killing the nc session.

EDIT - when I change it around to print results to a text file, no problem. So the issue seems to be that counts.print() isn't properly writing to the stdout of the console I'm running the example in.

Upvotes: 3

Views: 1350

Answers (1)

Fabian Hueske
Fabian Hueske

Reputation: 18997

DataStreams are printed to the standard-out of the TaskManager process. When starting a Flink instance (local or cluster), the standard-out of a TaskManager is directed into an .out file in the ./log/ directory of the Flink root directory. So you should check if the output is written into these files.

This behavior is different from DataSet.print(), where the results are collected on the JobManager, shipped to the client, and printed by the client.

Upvotes: 7

Related Questions