我的twitter数据格式不可读。我使用flume获取twitter数据,我正在尝试使用配置单元表读取这些数据。但我在hdfs中看不到正确的数据。详情如下:
Flume-env.sh-
export JAVA_HOME=/usr/java/jdk1.7.0_67-cloudera
FLUME_CLASSPATH="/opt/cloudera/parcels/CDH-5.8.0-1.cdh5.8.0.p0.42/lib/flume-ng/lib/flume-sources-1.0-SNAPSHOT.jar
twitter.conf-
TwitterAgent.sources = Twitter
TwitterAgent.channels = MemChannel
TwitterAgent.sinks = HDFS
TwitterAgent.sources.Twitter.type=org.apache.flume.source.twitter.TwitterSource
TwitterAgent.sources.Twitter.channels = MemChannel
TwitterAgent.sources.Twitter.consumerKey = xxxxxxxxxxxxxxxxxxxxxxxxx
TwitterAgent.sources.Twitter.consumerSecret = xxxxxxxxxxxxxxxxxxxxxxxx
TwitterAgent.sources.Twitter.accessToken = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TwitterAgent.sources.Twitter.accessTokenSecret = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TwitterAgent.sources.Twitter.keywords = hadoop, bigdata, data science
TwitterAgent.sinks.HDFS.channel = MemChannel
TwitterAgent.sinks.HDFS.type = hdfs
TwitterAgent.sinks.HDFS.hdfs.path = hdfs://opt:8020/user/flume/tweets
TwitterAgent.sinks.HDFS.hdfs.fileType = DataStream
TwitterAgent.sinks.HDFS.hdfs.writeFormat = Text
TwitterAgent.sinks.HDFS.hdfs.batchSize = 100
TwitterAgent.sinks.HDFS.hdfs.rollSize = 0
TwitterAgent.sinks.HDFS.hdfs.rollCount = 100
TwitterAgent.channels.MemChannel.type = memory
TwitterAgent.channels.MemChannel.capacity = 100
TwitterAgent.channels.MemChannel.transactionCapacity = 100
当我少做一个文件时:
有人能告诉我哪里出了问题吗?我需要这个数据的可读格式的配置单元表。
1条答案
按热度按时间eyh26e7m1#
断然的。刚刚将twitteragent.sources.twitter.type=org.apache.flume.source.twitter.twittersource更改为twitteragent.sources.twitter.type=com.cloudera.flume.source.twittersource