agent.sources.tailSrc.command 是什么意思?
what is mean by agent.sources.tailSrc.command?
我正在学习flume.While我正在尝试从我的系统中读取日志文件。我使用了以下代码..从互联网上下载。
agent.sources = tailSrc
agent.channels = memoryChannel
agent.sinks = hdfsSink
agent.sources.tailSrc.type = exec
agent.sources.tailSrc.command = tail -f /home/kumar/hadoop-2.5.1/logs/hadoop-kumar-namenode-admin.log
agent.sources.tailSrc.channels = memoryChannel
agent.sinks.hdfsSink.type = hdfs
agent.sinks.hdfsSink.hdfs.path = hdfs://localhost:50000/flume
agent.sinks.hdfsSink.channel = memoryChannel
agent.channels.memoryChannel.type = memory
agent.channels.memoryChannel.capacity = 100
在上面的代码中我不明白什么意思tailSrc.commands.I知道源是在代理中配置并从外部源获取事件(数据)。
在您的代码中 agent.sources.tailSrc.command 是 exec-source.just 参考 link.
https://flume.apache.org/FlumeUserGuide.html#exec-source
tail 是一个 unix 命令,默认情况下,tail 将输出其输入的最后 10 行。
您可以给出任何命令或循环而不是 tail.simple 这些命令执行并将输出作为源提供给 flume 代理。
我正在学习flume.While我正在尝试从我的系统中读取日志文件。我使用了以下代码..从互联网上下载。
agent.sources = tailSrc
agent.channels = memoryChannel
agent.sinks = hdfsSink
agent.sources.tailSrc.type = exec
agent.sources.tailSrc.command = tail -f /home/kumar/hadoop-2.5.1/logs/hadoop-kumar-namenode-admin.log
agent.sources.tailSrc.channels = memoryChannel
agent.sinks.hdfsSink.type = hdfs
agent.sinks.hdfsSink.hdfs.path = hdfs://localhost:50000/flume
agent.sinks.hdfsSink.channel = memoryChannel
agent.channels.memoryChannel.type = memory
agent.channels.memoryChannel.capacity = 100
在上面的代码中我不明白什么意思tailSrc.commands.I知道源是在代理中配置并从外部源获取事件(数据)。
在您的代码中 agent.sources.tailSrc.command 是 exec-source.just 参考 link.
https://flume.apache.org/FlumeUserGuide.html#exec-source
tail 是一个 unix 命令,默认情况下,tail 将输出其输入的最后 10 行。 您可以给出任何命令或循环而不是 tail.simple 这些命令执行并将输出作为源提供给 flume 代理。