我是 Flume-Ng 的新手,需要帮助来跟踪文件。我有一个运行 hadoop 的集群,flume 远程运行。我使用腻子与该集群通信。我想在我的 PC 上跟踪一个文件并将其放在集群中的 HDFS 上。我正在使用以下代码。
#flume.conf: http source, hdfs sink
# Name the components on this agent
tier1.sources = r1
tier1.sinks = k1
tier1.channels = c1
# Describe/configure the source
tier1.sources.r1.type = exec
tier1.sources.r1.command = tail -F /(Path to file on my PC)
# Describe the sink
tier1.sinks.k1.type = hdfs
tier1.sinks.k1.hdfs.path = /user/ntimbadi/flume/
tier1.sinks.k1.hdfs.filePrefix = events-
tier1.sinks.k1.hdfs.round = true
tier1.sinks.k1.hdfs.roundValue = 10
tier1.sinks.k1.hdfs.roundUnit = minute
# Use a channel which buffers events in memory
tier1.channels.c1.type = memory
tier1.channels.c1.capacity = 1000
tier1.channels.c1.transactionCapacity = 100
# Bind the source and sink to the channel
tier1.sources.r1.channels = c1
tier1.sinks.k1.channel = c1
我相信错误在源头上。这种来源不使用主机名或 ip 来查找(在这种情况下应该是我的 PC)。有人可以给我一个提示,告诉我如何在我的 PC 上跟踪文件以使用 Flume 将其上传到远程的 HDFS。