1
votes

I am trying to run the official example which shows how to use Apache Flink Streaming with Twitter: https://github.com/apache/flink/tree/master/flink-streaming-examples/src/main/java/org/apache/flink/streaming/examples/twitter

If I don’t provide the path to properties.file, the TwitterStreamData.java will be used. With “data looking like tweets” is all OK. But if I want to receive the real tweets (providing the correct property file), the execution stops and waits (no exceptions are thrown).

After the code debugging I found the place, where the execution stops and waits:

ClusterUtils.runOnMiniCluster(obGraph jobGraph, int parallelism, long memorySize, boolean printDuringExecution)

The programms runs until the row

SerializedJobExecutionResult result = exec.submitJobAndWait(jobGraph, printDuringExecution);

and waits.

The property file is OK, because I used it in the other example (streaming of tweets without apache flink) and that worked.

1
I assume you execute the job from the IDE? Can you see any log output? - Robert Metzger
Your problem seems to be a duplicate of stackoverflow.com/a/33157689/4815083. It's caused by a faulty httpClient version. I'll update the version in the master. - Till Rohrmann
Yes, thank you, I found this question with the solution a few hours ago. - Lena R.

1 Answers

1
votes

It was the problem with Apaches HttpClient 4.2. After adding HttpClient 4.2.6 to the dependencies of the project the programm runs. The same problem is discussing here: IOExcpetion while connecting to Twitter Streaming API with Apache Flink. I found the answer there.