我想從CDH-5.3.2版本的Flume中獲取數據。我已經配置了flume.conf,hbase sink和twitter源代碼。認證錯誤Flume的Twitter4J
但是,當我啓動代理,我得到這個以下錯誤:
2015-06-29 16:57:15,115 ERROR org.apache.flume.lifecycle.LifecycleSupervisor: Unable to start EventDrivenSourceRunner: { source:com.cloudera.flume.source.TwitterSource{name:Twitter,state:IDLE} } - Exception follows.
java.lang.IllegalStateException: Authentication credentials are missing. See http://twitter4j.org/configuration.html for the detail.
at twitter4j.TwitterBaseImpl.ensureAuthorizationEnabled(TwitterBaseImpl.java:200)
at twitter4j.TwitterStreamImpl.sample(TwitterStreamImpl.java:159)
at com.cloudera.flume.source.TwitterSource.start(TwitterSource.java:121)
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:745)
的flume.conf和HBase的沉代碼是相同的這個博客:http://ahikmat.blogspot.com/2014/08/streaming-twitter-tweets-to-hbase-with.html
而且,Twitter的源代碼與https://github.com/cloudera/cdh-twitter-example/tree/master/flume-sources/src/main/java/com/cloudera/flume/source
相同我不明白twitter4j中的auth錯誤,無論是回調url設置/ Twitter源代碼有問題。
您編輯'TwitterSourceConstants.java'添加您的應用程序的使用者密鑰和祕密? –
是的,我已經編輯這些代碼,用我的消費者密鑰和祕密 – ByanJati