2016-09-25 7 views
0

私はHDFSでTwitterデータを取得しようとしていますが、問題が発生しています。ここでFlumeを使用してHDFSでTwitterデータを取得中に発生する

は私flume.confファイルEnv.shファイルで

TwitterAgent.sources= Twitter 
TwitterAgent.channels= MemChannel 
TwitterAgent.sinks=HDFS 
TwitterAgent.sources.TwitterSource.type=org.apache.flume.source.twitter.TwitterSource 
TwitterAgent.sources.Twitter.channels=MemChannel 
TwitterAgent.sources.Twitter.consumerKey=xxxxxxxxxxx 
TwitterAgent.sources.Twitter.consumerSecret= xxxxxxxxxxxxxxx 
TwitterAgent.sources.Twitter.accessToken=xxxxxxxxxx 
TwitterAgent.sources.Twitter.accessTokenSecret=xxxxxxxxxxx 
TwitterAgent.sources.Twitter.keywords= hadoop,election,sports, cricket,Big data 
TwitterAgent.sinks.HDFS.channel=MemChannel 
TwitterAgent.sinks.HDFS.type=hdfs 
TwitterAgent.sinks.HDFS.hdfs.path=hdfs://localhost:9000/user/flume/tweets 
TwitterAgent.sinks.HDFS.hdfs.fileType=DataStream 
TwitterAgent.sinks.HDFS.hdfs.writeformat=Text 
TwitterAgent.sinks.HDFS.hdfs.batchSize=1000 
TwitterAgent.sinks.HDFS.hdfs.rollSize=0 
TwitterAgent.sinks.HDFS.hdfs.rollCount=10000 
TwitterAgent.sinks.HDFS.hdfs.rollInterval=600 
TwitterAgent.channels.MemChannel.type=memory 
TwitterAgent.channels.MemChannel.capacity=10000 
TwitterAgent.channels.MemChannel.transactionCapacity=100 

ですが、私は

#FLUME_CLASSPATH="/usr/lib/flume-sources-1.0-SNAPSHOT.jar" 

は、今私は、データを取得するには、以下のコマンドを使用していますパスを持っています -

[[email protected] etc]$ flume-ng agent -n TwitterAgent -c conf -f /etc/flume-ng/conf/flume.conf 

それshいくつかのログがありますが、私は以下のエラーが発生しており、HDFSシンクの開始後に固まっています。設定ファイルで

16/09/25 05:18:36 WARN conf.FlumeConfiguration: Could not configure source Twitter due to: Component has no type. Cannot configure. Twitter 
org.apache.flume.conf.ConfigurationException: Component has no type. Cannot configure. Twitter 
    at org.apache.flume.conf.ComponentConfiguration.configure(ComponentConfiguration.java:76) 
    at org.apache.flume.conf.source.SourceConfiguration.configure(SourceConfiguration.java:56) 
    at org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.validateSources(FlumeConfiguration.java:567) 
    at org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.isValid(FlumeConfiguration.java:346) 
    at org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.access$000(FlumeConfiguration.java:213) 
    at org.apache.flume.conf.FlumeConfiguration.validateConfiguration(FlumeConfiguration.java:127) 
    at org.apache.flume.conf.FlumeConfiguration.<init>(FlumeConfiguration.java:109) 
    at org.apache.flume.node.PropertiesFileConfigurationProvider.getFlumeConfiguration(PropertiesFileConfigurationProvider.java:189) 
    at org.apache.flume.node.AbstractConfigurationProvider.getConfiguration(AbstractConfigurationProvider.java:89) 
    at org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable.run(PollingPropertiesFileConfigurationProvider.java:140) 
    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) 
16/09/25 05:18:36 INFO conf.FlumeConfiguration: Post-validation flume configuration contains configuration for agents: [TwitterAgent] 
16/09/25 05:18:36 INFO node.AbstractConfigurationProvider: Creating channels 
16/09/25 05:18:36 INFO channel.DefaultChannelFactory: Creating instance of channel MemChannel type memory 
16/09/25 05:18:36 INFO node.AbstractConfigurationProvider: Created channel MemChannel 
16/09/25 05:18:36 INFO sink.DefaultSinkFactory: Creating instance of sink: HDFS, type: hdfs 
16/09/25 05:18:36 INFO node.AbstractConfigurationProvider: Channel MemChannel connected to [HDFS] 
16/09/25 05:18:36 INFO node.Application: Starting new configuration:{ sourceRunners:{} sinkRunners:{HDFS=SinkRunner: { policy:[email protected] counterGroup:{ name:null counters:{} } }} channels:{MemChannel=org.apache.flume.channel.MemoryChannel{name: MemChannel}} } 
16/09/25 05:18:36 INFO node.Application: Starting Channel MemChannel 
16/09/25 05:18:36 INFO instrumentation.MonitoredCounterGroup: Monitored counter group for type: CHANNEL, name: MemChannel: Successfully registered new MBean. 
16/09/25 05:18:36 INFO instrumentation.MonitoredCounterGroup: Component type: CHANNEL, name: MemChannel started 
16/09/25 05:18:36 INFO node.Application: Starting Sink HDFS 
16/09/25 05:18:36 INFO instrumentation.MonitoredCounterGroup: Monitored counter group for type: SINK, name: HDFS: Successfully registered new MBean. 
16/09/25 05:18:36 INFO instrumentation.MonitoredCounterGroup: Component type: SINK, name: HDFS started 

答えて

0

TwitterAgent.sources.Twitter.type=org.apache.flume.source.twitter.TwitterSource 
+0

こんにちは@shubhangi Pardeshiによってあなたのコメントをありがとう

TwitterAgent.sources.TwitterSource.type=org.apache.flume.source.twitter.TwitterSource 

を交換してください。私は既にClouderaコミュニティからそれを試みたが、まだ、私は何の出力も得られていない。同じ問題が続きます。 – ashutosh

関連する問題