收集指定文件的内容到HDFS(exec-memory-hdfs)

太过爱你忘了你带给我的痛 2022-11-26 08:47 202阅读 0赞

选型:source channel sink
exec memory hdfs

  1. # Name the components on this agent
  2. a1.sources = r1
  3. a1.sinks = k1
  4. a1.channels = c1
  5. # Describe/configure the source
  6. a1.sources.r1.type = exec
  7. a1.sources.r1.command = tail -F /bigdata/testdata/flume.dat
  8. a1.sources.r1.shell = /bin/sh -c
  9. # Describe the sink
  10. a1.sinks.k1.type = hdfs
  11. a1.sinks.k1.hdfs.path=hdfs://localhost:8020/flume/tail/
  12. a1.sinks.k1.hdfs.fileType=DataStream
  13. a1.sinks.k1.hdfs.writeFormat=Text
  14. a1.sinks.k1.hdfs.batchSize=10
  15. # Use a channel which buffers events in memory
  16. a1.channels.c1.type = memory
  17. a1.channels.c1.capacity = 1000
  18. a1.channels.c1.transactionCapacity = 100
  19. # Bind the source and sink to the channel
  20. a1.sources.r1.channels = c1
  21. a1.sinks.k1.channel = c1

发表评论

表情:
评论列表 (有 0 条评论,202人围观)

还没有评论,来说两句吧...

相关阅读