public class TwitterUtils
extends Object
Constructor and Description |
---|
TwitterUtils() |
Modifier and Type | Method and Description |
---|---|
static JavaReceiverInputDStream<twitter4j.Status> |
createStream(JavaStreamingContext jssc)
Create a input stream that returns tweets received from Twitter using Twitter4J's default
OAuth authentication; this requires the system properties twitter4j.oauth.consumerKey,
twitter4j.oauth.consumerSecret, twitter4j.oauth.accessToken and
twitter4j.oauth.accessTokenSecret.
|
static JavaReceiverInputDStream<twitter4j.Status> |
createStream(JavaStreamingContext jssc,
twitter4j.auth.Authorization twitterAuth)
Create a input stream that returns tweets received from Twitter.
|
static JavaReceiverInputDStream<twitter4j.Status> |
createStream(JavaStreamingContext jssc,
twitter4j.auth.Authorization twitterAuth,
String[] filters)
Create a input stream that returns tweets received from Twitter.
|
static JavaReceiverInputDStream<twitter4j.Status> |
createStream(JavaStreamingContext jssc,
twitter4j.auth.Authorization twitterAuth,
String[] filters,
StorageLevel storageLevel)
Create a input stream that returns tweets received from Twitter.
|
static JavaReceiverInputDStream<twitter4j.Status> |
createStream(JavaStreamingContext jssc,
String[] filters)
Create a input stream that returns tweets received from Twitter using Twitter4J's default
OAuth authentication; this requires the system properties twitter4j.oauth.consumerKey,
twitter4j.oauth.consumerSecret, twitter4j.oauth.accessToken and
twitter4j.oauth.accessTokenSecret.
|
static JavaReceiverInputDStream<twitter4j.Status> |
createStream(JavaStreamingContext jssc,
String[] filters,
StorageLevel storageLevel)
Create a input stream that returns tweets received from Twitter using Twitter4J's default
OAuth authentication; this requires the system properties twitter4j.oauth.consumerKey,
twitter4j.oauth.consumerSecret, twitter4j.oauth.accessToken and
twitter4j.oauth.accessTokenSecret.
|
static ReceiverInputDStream<twitter4j.Status> |
createStream(StreamingContext ssc,
scala.Option<twitter4j.auth.Authorization> twitterAuth,
scala.collection.Seq<String> filters,
StorageLevel storageLevel)
Create a input stream that returns tweets received from Twitter.
|
public static ReceiverInputDStream<twitter4j.Status> createStream(StreamingContext ssc, scala.Option<twitter4j.auth.Authorization> twitterAuth, scala.collection.Seq<String> filters, StorageLevel storageLevel)
ssc
- StreamingContext objecttwitterAuth
- Twitter4J authentication, or None to use Twitter4J's default OAuth
authorization; this uses the system properties twitter4j.oauth.consumerKey,
twitter4j.oauth.consumerSecret, twitter4j.oauth.accessToken and
twitter4j.oauth.accessTokenSecretfilters
- Set of filter strings to get only those tweets that match themstorageLevel
- Storage level to use for storing the received objectspublic static JavaReceiverInputDStream<twitter4j.Status> createStream(JavaStreamingContext jssc)
jssc
- JavaStreamingContext objectpublic static JavaReceiverInputDStream<twitter4j.Status> createStream(JavaStreamingContext jssc, String[] filters)
jssc
- JavaStreamingContext objectfilters
- Set of filter strings to get only those tweets that match thempublic static JavaReceiverInputDStream<twitter4j.Status> createStream(JavaStreamingContext jssc, String[] filters, StorageLevel storageLevel)
jssc
- JavaStreamingContext objectfilters
- Set of filter strings to get only those tweets that match themstorageLevel
- Storage level to use for storing the received objectspublic static JavaReceiverInputDStream<twitter4j.Status> createStream(JavaStreamingContext jssc, twitter4j.auth.Authorization twitterAuth)
jssc
- JavaStreamingContext objecttwitterAuth
- Twitter4J Authorizationpublic static JavaReceiverInputDStream<twitter4j.Status> createStream(JavaStreamingContext jssc, twitter4j.auth.Authorization twitterAuth, String[] filters)
jssc
- JavaStreamingContext objecttwitterAuth
- Twitter4J Authorizationfilters
- Set of filter strings to get only those tweets that match thempublic static JavaReceiverInputDStream<twitter4j.Status> createStream(JavaStreamingContext jssc, twitter4j.auth.Authorization twitterAuth, String[] filters, StorageLevel storageLevel)
jssc
- JavaStreamingContext objecttwitterAuth
- Twitter4J Authorization objectfilters
- Set of filter strings to get only those tweets that match themstorageLevel
- Storage level to use for storing the received objects