Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
0.5.0
Description
When attempting to create a stream with a Twitter provider, the `info` field should contain numerical TwitterIDs or usernames, however when using twitter usernames an error is generated
```
java.lang.IllegalArgumentException
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:108)
at org.apache.streams.twitter.provider.TwitterTimelineProvider.startStream(TwitterTimelineProvider.java:110)
```
TO RECREATE:
```scala
import com.typesafe.config._
import org.apache.streams.config._
import org.apache.streams.core._
import java.util.Iterator
import org.apache.streams.twitter.TwitterUserInformationConfiguration
import org.apache.streams.twitter.pojo._
import org.apache.streams.twitter.provider._
val hocon = s"""
twitter {
oauth
retrySleepMs = 5000
retryMax = 250
info = [
rawkintrevo <--- This will create an error
1566016094 <--- this will not
]
}
"""
val buf = scala.collection.mutable.ArrayBuffer.empty[Object]
val typesafe = ConfigFactory.parseString(hocon)
val config = new ComponentConfigurator(classOf[TwitterUserInformationConfiguration]).detectConfiguration(typesafe, "twitter");
val provider = new TwitterTimelineProvider(config);
provider.prepare(null)
provider.startStream()
while(provider.isRunning()) {
val resultSet = provider.readCurrent()
resultSet.size()
val iterator = resultSet.iterator();
while(iterator.hasNext())
}
```
Attachments
Issue Links
- links to