例子参考资料:http://www.aboutyun.com/thread-8917-1-1.html

自定义sink实现和属性注入:http://www.coderli.com/flume-ng-sink-properties/

自定义拦截器:http://blog.csdn.net/xiao_jun_0820/article/details/38333171

自定义kafkasink:www.itnose.net/detail/6187977.html

1. 使用avro发送指定文件

(1)在conf文件夹下创建avro.conf文件,写入如下配置
vim /usr/local/hadoop/apache-flume-1.6.0-bin/conf/avro.conf

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
View Code

相关文章:

  • 2021-11-08
  • 2021-12-14
  • 2021-09-27
  • 2021-08-17
  • 2021-12-09
  • 2021-11-23
  • 2021-08-09
  • 2022-01-06
猜你喜欢
  • 2021-11-20
  • 2021-12-01
  • 2021-08-05
  • 2021-10-28
  • 2021-11-08
  • 2021-08-28
  • 2021-05-08
  • 2021-11-23
相关资源
相似解决方案