flume没有使用SocialAgent获取Facebook数据

时间:2015-02-10 15:11:32

标签: hadoop bigdata flume sentiment-analysis

我正在尝试使用flume SocialAgent检索Facebook数据。我已经使用TwitterAgent成功检索了Twitter数据。

但是对于Facebook,我在hdfs中什么都没有。

enter image description here

我的终端卡在这个阶段。当我终止这个过程时,我得到了这个

enter image description here

我的HDFS facebook文件夹是空的。我正在使用以下flume.conf

SocialAgent.sources = FacebookHttpSource Twitter
SocialAgent.channels = FBmemoryChannel MemChannel
SocialAgent.sinks = fbHDFS HDFS

# For each one of the sources, the type is defined
SocialAgent.sources.FacebookHttpSource.type = org.apache.flume.source.http.HTTPSource
SocialAgent.sources.FacebookHttpSource.port = 51400
SocialAgent.sources.FacebookHttpSource.interceptors = Ts
SocialAgent.sources.FacebookHttpSource.interceptors.Ts.type = org.apache.flume.interceptor.TimestampInterceptor$Builder

# The channel can be defined as follows.
SocialAgent.sources.FacebookHttpSource.channels = FBmemoryChannel

# Each sink's type must be defined
#Specify the channel the sink should use
SocialAgent.sinks.fbHDFS.channel = FBmemoryChannel
SocialAgent.sinks.fbHDFS.type = hdfs
SocialAgent.sinks.fbHDFS.hdfs.path = hdfs://localhost:9000/user/flume/facebook/%Y/%m/%d/%H/
SocialAgent.sinks.fbHDFS.hdfs.fileType = DataStream
SocialAgent.sinks.fbHDFS.hdfs.writeFormat = Text
SocialAgent.sinks.fbHDFS.hdfs.batchSize = 1000
SocialAgent.sinks.fbHDFS.hdfs.rollSize = 0
SocialAgent.sinks.fbHDFS.hdfs.rollCount = 10000

# Each channel's type is defined.
SocialAgent.channels.FBmemoryChannel.type = memory

# Other config values specific to each type of channel(sink or source)
# can be defined as well
# In this case, it specifies the capacity of the memory channel
SocialAgent.channels.FBmemoryChannel.capacity = 10000
SocialAgent.channels.FBmemoryChannel.transactionCapacity = 100

是否有任何其他水槽代理程序可以获取FaceBook数据。

1 个答案:

答案 0 :(得分:1)

配置中的

org.apache.flume.source.http.HTTPSource 不会向Facebook发送任何获取数据的请求。它只是监听一个端口(在你的情况下是51400)并等待任何请求 (https://flume.apache.org/FlumeUserGuide.html#http-source

据我所知,还没有任何Flume FBClient。