Github user sjbrunst commented on a diff in the pull request:
https://github.com/apache/spark/pull/1717#discussion_r34572915
--- Diff:
external/twitter/src/main/scala/org/apache/spark/streaming/twitter/TwitterInputDStream.scala
---
@@ -86,12 +97,18 @@ class TwitterReceiver(
})
val query = new FilterQuery
- if (filters.size > 0) {
- query.track(filters.toArray)
- newTwitterStream.filter(query)
- } else {
- newTwitterStream.sample()
+ query.count(count)
+ if (follow.size > 0) {
+ query.follow(follow.toArray)
+ }
+ if (track.size > 0) {
+ query.track(track.toArray)
+ }
+ if (locations.size > 0) {
+ query.locations(locations.flatMap(box =>
+ Seq(Array(box.west, box.south), Array(box.east,
box.north))).toArray)
--- End diff --
Good catch. It won't compile without the `.toArray` at the end, but I can
change the `Seq` to `Array`. I will update the code.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]