说明
| source: 2 |
| channel: 2 |
| sink: 2 |
配置文件
| |
| |
| a1.sources = r1 r2 |
| a1.sinks = k1 k2 |
| a1.channels = c1 c2 |
| |
| |
| a1.sources.r1.type = netcat |
| a1.sources.r1.bind = localhost |
| a1.sources.r1.port = 44444 |
| |
| a1.sources.r2.type = exec |
| a1.sources.r2.command = tail -f /opt/test/a.txt |
| |
| |
| a1.sinks.k2.type = logger |
| |
| a1.sinks.k1.type = hdfs |
| |
| a1.sinks.k1.hdfs.path = hdfs://node1:9000/flume/%Y%m%d/%H |
| |
| a1.sinks.k1.hdfs.filePrefix = port- |
| |
| a1.sinks.k1.hdfs.fileSuffix = .log |
| |
| a1.sinks.k1.hdfs.round = true |
| |
| a1.sinks.k1.hdfs.roundValue = 1 |
| |
| a1.sinks.k1.hdfs.roundUnit = hour |
| |
| a1.sinks.k1.hdfs.useLocalTimeStamp = true |
| |
| a1.sinks.k1.hdfs.batchSize = 1000 |
| |
| a1.sinks.k1.hdfs.fileType = DataStream |
| |
| a1.sinks.k1.hdfs.rollInterval = 60 |
| |
| a1.sinks.k1.hdfs.rollSize = 134217700 |
| |
| a1.sinks.k1.hdfs.rollCount = 0 |
| |
| a1.sinks.k1.hdfs.minBlockReplicas = 1 |
| |
| |
| a1.channels.c1.type = memory |
| a1.channels.c1.capacity = 1000 |
| a1.channels.c1.transactionCapacity = 100 |
| |
| a1.channels.c2.type = memory |
| a1.channels.c2.capacity = 1000 |
| a1.channels.c2.transactionCapacity = 100 |
| |
| a1.sources.r1.channels = c1 c2 |
| a1.sources.r2.channels = c2 |
| a1.sinks.k1.channel = c2 |
| a1.sinks.k2.channel = c1 |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?