寒假学习 13 使用Avro数据源测试Flume
1.1 创建 avro.conf
# Name the components on this agent
a1.sources = r1
a1.sinks = k1
a1.channels = c1
# Describe/configure the source
a1.sources.r1.type = avro
a1.sources.r1.channels = c1
a1.sources.r1.bind = 0.0.0.0
a1.sources.r1.port = 4141
# Describe the sink
a1.sinks.k1.type = logger
# Use a channel which buffers events in memory
a1.channels.c1.type = memory
a1.channels.c1.capacity = 1000
a1.channels.c1.transactionCapacity = 100
# Bind the source and sink to the channel
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1
2.2 创建 helloworld.txtz
在此目录下 /usr/flume/flume-1.7.0
vi helloworld.txt
Hello World
Hello Flume
2.3 启动 agent
2.4 在同目录下新建一个命令终端,使用avro-client发送文件
在这个终端发送字符,在另一个终端可以接收到字符