S4 version3 - twittertopiccount count 0

36 views
Skip to first unread message

Karthik Kambatla

unread,
Oct 4, 2011, 9:20:25 PM10/4/11
to s4-pr...@googlegroups.com
Hello

I am experiencing issues with running the twittertopiccount example in standalone mode. AFAIK, I followed the documentation - http://docs.s4.io/tutorials/getting_started.html - to the letter. However, the file /tmp/top_n_hashtags is not created. Also, the logs show that the event count is 0. I doubt if the TwitterFeedListener is actually pumping the data. Am I missing something basic here?

I have previously successfully run the twittertopiccount example on version 2 - both standalone and multiple machines.

Thanks much,
Karthik

anand nalya

unread,
Oct 4, 2011, 11:21:24 PM10/4/11
to s4-pr...@googlegroups.com
It seems like you are not getting data from twitter. Try to sysout data read from twitter in TwitterFeedListener
 
Anand

Hoa Dung Ha Duong

unread,
Oct 5, 2011, 1:16:37 AM10/5/11
to s4-pr...@googlegroups.com
Hi

We are having problems too (using the last available
TwitterFeedListener version).
The connection to twitter in twitter_feed_listener is refused,
although the username and password are legit.
Maybe it's an issue on twitter side?

Hoa

Zahoor

unread,
Oct 5, 2011, 1:18:31 AM10/5/11
to s4-pr...@googlegroups.com
I think Twitter removed Basic Auth :-)
So this example will not work in that case.

./zahoor
--
./zahoor
Twit: @jmohamedzahoor

Hoa Dung Ha Duong

unread,
Oct 5, 2011, 4:57:36 AM10/5/11
to s4-pr...@googlegroups.com
According to my colleague, it works using
http://stream.twitter.com/1/statuses/sample.json (not using https).

anneha

unread,
Oct 5, 2011, 4:59:37 AM10/5/11
to s4-project
The solution: edit the class TwitterFeedListener and use "https://
stream.twitter.com/1/statuses/sample.json" in variable
"urlString" ("s" is missing)
(private String urlString = "https://stream.twitter.com/1/statuses/
sample.json";)

Twitter are now using "https".

On 5 Okt., 07:18, Zahoor <zah...@zahoor.in> wrote:
> I think Twitter removed Basic Auth :-)
> So this example will not work in that case.
>
> ./zahoor
>
> On Wed, Oct 5, 2011 at 10:46 AM, Hoa Dung Ha Duong <hoa.hadu...@gmail.com>wrote:
>
>
>
>
>
>
>
>
>
> > Hi
>
> > We are having problems too (using the last available
> > TwitterFeedListener version).
> > The connection to twitter in twitter_feed_listener is refused,
> > although the username and password are legit.
> > Maybe it's an issue on twitter side?
>
> > Hoa
>
> > On Wed, Oct 5, 2011 at 5:21 AM, anand nalya <a.na...@computer.org> wrote:
> > > It seems like you are not getting data from twitter. Try to sysout data
> > read
> > > from twitter in TwitterFeedListener
>
> > > Anand
>
> > > On 5 October 2011 06:50, Karthik Kambatla
> > > <karthik.shashank.kamba...@gmail.com> wrote:
>
> > >> Hello
> > >> I am experiencing issues with running the twittertopiccount example in
> > >> standalone mode. AFAIK, I followed the documentation
> > >> -http://docs.s4.io/tutorials/getting_started.html- to the letter.

Albert Everett

unread,
Oct 20, 2011, 12:00:14 PM10/20/11
to s4-pr...@googlegroups.com
Perhaps this fix should be rolled into v0.3.1, or have the documentation updated to show how to fix the java file.

After the file is fixed, run the gradlew steps again.

$ cd ~/s4project

$ find . -name TwitterFeedListener.java -print
./twittertopiccount/src/main/java/io/s4/example/twittertopiccount/TwitterFeedListener.java

$ cd twittertopiccount/src/main/java/io/s4/example/twittertopiccount

$ ls TwitterFeed*
TwitterFeedListener.java  TwitterFeedListener.java-ORIG

$ diff TwitterFeedListener.java TwitterFeedListener.java-ORIG
48c48
<     private String urlString = "https://stream.twitter.com/1/statuses/sample.json";
---
>     private String urlString = "http://stream.twitter.com/1/statuses/sample.json";

Matthieu Morel

unread,
Oct 20, 2011, 12:43:27 PM10/20/11
to s4-project
Thanks for (re)pointing this out!

I just filed a ticket for that. Will fix for next release:
https://issues.apache.org/jira/browse/S4-16

Matthieu
Reply all
Reply to author
Forward
0 new messages