在Apache Flume中实现Twitter的Search API

时间:2014-11-06 19:49:16

标签: hadoop twitter4j flume

{"errors":[{"message":"The Twitter REST API v1 is no longer active. Please migrate to API v1.1.       https://dev.twitter.com/docs/api/1.1/overview.","code":64}]}
Relevant discussions can be found on the Internet at:
http://www.google.co.jp/search?q=d35baff5 or
http://www.google.co.jp/search?q=0877c84f
TwitterException{exceptionCode=[d35baff5-0877c84f], statusCode=410, retryAfter=-1,    rateLimitStatus=null, featureSpecificRateLimitStatus=null, version=2.2.6}
at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:185)
at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:65)
at twitter4j.internal.http.HttpClientWrapper.get(HttpClientWrapper.java:85)
at twitter4j.TwitterImpl.get(TwitterImpl.java:1728)
at twitter4j.TwitterImpl.search(TwitterImpl.java:98)
at org.twitter.search.Source.SearchSource.start(SearchSource.java:85)
at org.apache.flume.source.EventDrivenSourceRunner.start(EventDrivenSourceRunner.java:44)
at org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run(LifecycleSupervisor.java:251)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Failed to search tweets: 410:

这是我在尝试使用Twitter的REST API时遇到的错误。我创建了我的源文件,类似于Cloudera创建的源文件(https://github.com/cloudera/cdh-twitter-example/blob/master/flume-sources/src/main/java/com/cloudera/flume/source/TwitterSource.java)。当我尝试使用Search API时,Cloudera使用Streaming API。我使用Twitter4j库并调用了"搜索"方法,但由于某种原因,它给了我这个错误。我不知道它是什么问题。

0 个答案:

没有答案