断点续传

# Name the components on this agent
a1.sources = r1
a1.sinks = k1
a1.channels = c1 # Describe / configure the source
a1.sources.r1.type = TAILDIR
a1.sources.r1.filegroups = f1 f2
a1.sources.r1.filegroups.f1 = /usr/local/flume/example/file1.txt
a1.sources.r1.filegroups.f2 = /usr/local/flume/example/file2.txt
a1.sources.r1.positionFile = /usr/local/flume/position/postition.json # 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

执行

./bin/flume-ng agent -c conf/ -f job/file-flume-point-logger.conf -n a1 -Dflume.root.logger=INFO,console

运行结果

原理

在配置的/usr/local/flume/position/postition.json文件中,会发现,flume将位置信息记录在这个postition中。

[{"inode":33855378,"pos":23,"file":"/usr/local/flume/example/file1.txt"},{"inode":33855380,"pos":36,"file":"/usr/local/flume/example/file2.txt"}]

事务

put事务和take事务

最新文章

  1. python学习笔记整理——dictView [未整理]
  2. AccessViolationException: 尝试读取或写入受保护的内存。这通常指示其他内存已损坏。
  3. 【leetcode❤python】171. Excel Sheet Column Number
  4. js数组去重的三种常用方法总结
  5. (原创)Windows8下安装配置WAMP
  6. 简单的web三层架构系统【第三版】
  7. C语言深度剖析---const关键字(转载)
  8. hdu1172猜数字
  9. ADOConnection数据库连接池
  10. json解包与json封包
  11. .NetCore上传多文件的几种示例
  12. bzoj4514 [Sdoi2016]数字配对
  13. Java中 try--catch-- finally、throw、throws 的用法
  14. Spring:获取容器中的Bean
  15. Python基础-python数据类型(四)
  16. [转][C#]TopSelf
  17. apache 允许 访问软链接 ( Apache won't follow symlinks (403 Forbidden) )
  18. Java NIO ServerSocketChannel
  19. python 读取文件时报错: UnicodeDecodeError: 'gbk' codec can't decode byte 0xa4 in position 127: illegal multibyte sequence
  20. Oracle重建临时表空间

热门文章

  1. 吴裕雄--天生自然TensorFlow2教程:合并与分割
  2. APP测试关注的点 - 笔记
  3. linux_ssh用户枚举猜测
  4. codeforces 596 C. p-binary
  5. .NET技术-4.0. NETCORE跨域
  6. HashMap的fast-fail和ConcurrentHashMap的fail-safe实例
  7. 对PHP-GC(垃圾回收)的一点理解
  8. libcurl在windows下的使用
  9. day68-CSS-float浮动,clear清除浮动,overflow溢出
  10. 第二季第六天 part2 css动画