java.lang.NullPointerException: Expected timestamp in the Flume event headers, but it was null

使用flume的时候出现的问题。 官网文档说的是需要在每个文件记录行的开头需要有时间戳,可以设置hdfs.useLocalTimeStamp这个参数,配置:

 

 

a1.sinks.k1.type=hdfs
a1.sinks.k1.hdfs.path=hdfs://10.42.148.80:9000/weblog/reportTime=%Y-%m-%d
a1.sinks.k1.hdfs.fileType=DataStream
a1.sinks.k1.hdfs.rollInterval=0
a1.sinks.k1.hdfs.rollSize=0
a1.sinks.k1.hdfs.rollCount=1000
a1.sinks.k1.hdfs.useLocalTimeStamp = true
posted @ 2020-01-06 16:51  carrors  阅读(751)  评论(0编辑  收藏  举报