我使用以下配置在 ubuntu 14.04 上运行 td-agent:
<source>
type tail
format json
path /path/tomcat/logs/file-input.log
tag bhc.hdfs
pos_file /var/td-agent/file.pos
</source>
<match bhc.hdfs>
type webhdfs
port 50070
host my.host.name
path /hdfs/path/file.${hostname}.%Y%m%d.log
username user
flush_interval 10s
output_include_time false
output_include_tag false
output_data_type json
</match>
目录/path/tomcat/logs/file-input.log中的日志源文件仅包含结构化的 json 数据。Ntp 守护程序已安装并正在运行,但是当 td-agent 在 hdfs 中创建文件时,文件名的日期为 19700101。出了什么问题?