mirror of https://github.com/apache/druid.git
Upgraded to twitter4j 3.0.3, twitter example now works with twitter4j.properties in place that lists key pairs.
This commit is contained in:
parent
b96d6b3546
commit
58780094a9
|
@ -125,17 +125,17 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.twitter4j</groupId>
|
<groupId>org.twitter4j</groupId>
|
||||||
<artifactId>twitter4j-core</artifactId>
|
<artifactId>twitter4j-core</artifactId>
|
||||||
<version>2.2.6</version>
|
<version>3.0.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.twitter4j</groupId>
|
<groupId>org.twitter4j</groupId>
|
||||||
<artifactId>twitter4j-async</artifactId>
|
<artifactId>twitter4j-async</artifactId>
|
||||||
<version>2.2.6</version>
|
<version>3.0.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.twitter4j</groupId>
|
<groupId>org.twitter4j</groupId>
|
||||||
<artifactId>twitter4j-stream</artifactId>
|
<artifactId>twitter4j-stream</artifactId>
|
||||||
<version>2.2.6</version>
|
<version>3.0.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Tests -->
|
<!-- Tests -->
|
||||||
|
|
|
@ -17,6 +17,7 @@ import twitter4j.StatusListener;
|
||||||
import twitter4j.TwitterStream;
|
import twitter4j.TwitterStream;
|
||||||
import twitter4j.TwitterStreamFactory;
|
import twitter4j.TwitterStreamFactory;
|
||||||
import twitter4j.User;
|
import twitter4j.User;
|
||||||
|
import twitter4j.StallWarning;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
@ -31,7 +32,7 @@ import java.util.concurrent.TimeUnit;
|
||||||
import static java.lang.Thread.sleep;
|
import static java.lang.Thread.sleep;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Twitter "spritzer" Firehost Factory named "twitzer".
|
* Twitter "spritzer" Firehose Factory named "twitzer".
|
||||||
* Builds a Firehose that emits a stream of
|
* Builds a Firehose that emits a stream of
|
||||||
* ??
|
* ??
|
||||||
* with timestamps along with ??.
|
* with timestamps along with ??.
|
||||||
|
@ -176,6 +177,11 @@ public class TwitterSpritzerFirehoseFactory implements FirehoseFactory {
|
||||||
{
|
{
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStallWarning(StallWarning warning) {
|
||||||
|
System.out.println("Got stall warning:" + warning);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
twitterStream.addListener(statusListener);
|
twitterStream.addListener(statusListener);
|
||||||
|
|
Loading…
Reference in New Issue