由客户端采集的日志都准备存储到hdfs中,关于hdfs存储的方式,文档中这么说的
- hdfs.rollInterval 30 Number of seconds to wait before rolling current file (0 = never roll based on time interval)
- hdfs.rollSize 1024 File size to trigger roll, in bytes (0: never roll based on file size)
- hdfs.rollCount 10 Number of events written to file before it rolled (0 = never roll based on number of events)
复制代码
但是,我无论咋配置,在hdfs目录下都是一些零碎的小文件,hdfs不能把这些日志写在一个文件中然后滚动吗?
我这样配置的
- agent.sinks.hdfs-sink1.hdfs.rooInterval=0
- agent.sinks.hdfs-sink1.hdfs.rollCount=0
- agent.sinks.hdfs-sink1.hdfs.rollSize=1048576
复制代码
|