13k 12 分钟

# Flume 练习题 # 题目 1 需求:使用 Flume 监听一个端口,收集该端口数据,并打印到控制台。 #步骤一:agent Namea1.sources = r1a1.sinks = k1a1.channels = c1#步骤二:sourcea1.sources.r1.type = netcata1.sources.r1.bind = localhost a1.sources.r1.port = 44444 #步骤三: channel selectora1.sources.r1.selector.type = replicating#步骤四: channel# Describe...
12k 11 分钟

# 一、写 flume 的步骤 # 1.0.0 Flume 事务 # 1.1 画拓扑图 总结:一个 channel 只能输出一个结果文件。 一个 flume agent 由 source + channel + sink 构成,类比于 mapper + shuffer + reducer。 # 1.1.1 确定 source 类型 常用类型: 1) arvo: 用于Flume agent 之间的数据源传递 2) netcat: 用于监听端口 3)exec: 用于执行linux中的操作指令 4) spooldir: 用于监视文件或目录 5) taildir:...