画图理解

配置文件编写
第一个服务器
| [root@node1 one] |
| one.sources = r1 |
| one.sinks = k1 |
| one.channels = c1 |
| |
| one.sources.r1.type = exec |
| one.sources.r1.command = tail -F /opt/data/one/one.txt |
| |
| one.sinks.k1.type = avro |
| one.sinks.k1.hostname = node1 |
| one.sinks.k1.port = 40000 |
| |
| one.channels.c1.type = memory |
| one.channels.c1.capacity = 1000 |
| one.channels.c1.transactionCapacity = 100 |
| |
| one.sources.r1.channels = c1 |
| one.sinks.k1.channel = c1 |
第二个服务器
| [root@node1 two] |
| two.sources = r1 |
| two.sinks = k1 |
| two.channels = c1 |
| |
| two.sources.r1.type = exec |
| two.sources.r1.command = tail -F /opt/data/two/two.txt |
| |
| two.sinks.k1.type = avro |
| two.sinks.k1.hostname = node1 |
| two.sinks.k1.port = 40000 |
| |
| two.channels.c1.type = memory |
| two.channels.c1.capacity = 1000 |
| two.channels.c1.transactionCapacity = 100 |
| |
| two.sources.r1.channels = c1 |
| two.sinks.k1.channel = c1 |
聚合服务器
| [root@node1 aggre] |
| |
| |
| aggre.sources = r1 |
| aggre.sinks = k1 |
| aggre.channels = c1 |
| |
| |
| aggre.sources.r1.type = avro |
| aggre.sources.r1.bind = node1 |
| aggre.sources.r1.port = 40000 |
| |
| |
| aggre.sinks.k1.type = hdfs |
| |
| aggre.sinks.k1.hdfs.path = hdfs://node1:9000/log/ |
| |
| aggre.sinks.k1.hdfs.filePrefix = web- |
| |
| aggre.sinks.k1.hdfs.fileSuffix = .log |
| |
| aggre.sinks.k1.hdfs.round = false |
| |
| aggre.sinks.k1.hdfs.useLocalTimeStamp = true |
| |
| aggre.sinks.k1.hdfs.batchSize = 1000 |
| |
| aggre.sinks.k1.hdfs.fileType = DataStream |
| |
| aggre.sinks.k1.hdfs.rollInterval = 3600 |
| |
| aggre.sinks.k1.hdfs.rollSize = 134217700 |
| |
| aggre.sinks.k1.hdfs.rollCount = 0 |
| |
| aggre.sinks.k1.hdfs.minBlockReplicas = 1 |
| |
| aggre.channels.c1.type = memory |
| aggre.channels.c1.capacity = 1000 |
| aggre.channels.c1.transactionCapacity = 100 |
| |
| aggre.sources.r1.channels = c1 |
| aggre.sinks.k1.channel = c1 |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?