java.lang.NullPointerException: Expected timestamp in the Flume event headers, but it was null
2014-03-13 11:05
316 查看
使用flume的时候出现的问题。
sink是hdfs,然后使用目录自动生成功能。出现如题的错误,看官网文档说的是需要在每个文件记录行的开头需要有时间戳,但是时间戳的格式可能比较难调节,所以亦可设置hdfs.useLocalTimeStamp这个参数,比如以每个小时作为一个文件夹,那么配置应该是这样:
或者修改hdfs.timeZone这个参数使之可以和我们上传的log文件的日期格式一样应该就可以了,没有测试过。
sink是hdfs,然后使用目录自动生成功能。出现如题的错误,看官网文档说的是需要在每个文件记录行的开头需要有时间戳,但是时间戳的格式可能比较难调节,所以亦可设置hdfs.useLocalTimeStamp这个参数,比如以每个小时作为一个文件夹,那么配置应该是这样:
a1.sinks.k1.hdfs.path = hdfs://ubuntu:9000/flume/events/%y-%m-%d/%H a1.sinks.k1.hdfs.filePrefix = events- a1.sinks.k1.hdfs.round = true a1.sinks.k1.hdfs.roundValue = 1 a1.sinks.k1.hdfs.roundUnit = hour a1.sinks.k1.hdfs.useLocalTimeStamp = true
或者修改hdfs.timeZone这个参数使之可以和我们上传的log文件的日期格式一样应该就可以了,没有测试过。
相关文章推荐
- java.lang.NullPointerException: Expected timestamp in the Flume event headers, but it was null
- java.lang.NullPointerException: Expected timestamp in the Flume event headers, but it was null
- java.lang.NullPointerException: Expected timestamp in the Flume event headers, but it was null
- Exception in thread "Thread-0" java.lang.NullPointerException
- 对象数组报错“空指针”:Exception in thread "main" java.lang.NullPointerException
- 分析java.lang.NullPointerException thrown in RelativeLayout measure()
- Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
- Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
- Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
- Exception in thread "HouseKeeper" java.lang.NullPointerException
- The addressing-1.5.mar module, which is not valid, caused null java.lang.ExceptionInInitializerError
- 项目启动时出现Exception in thread "HouseKeeper" java.lang.NullPointerException
- Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
- Could not publish to the server. java.lang.NullPointerException
- Exception in thread "main" java.lang.NullPointerException java报空指针异常
- Could not publish to the server. java.lang.NullPointerException
- Exception in thread "Timer-0" java.lang.NullPointerException
- hdfs下载出现Exception in thread "main" java.lang.NullPointerException
- java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected
- Could not publish to the server. java.lang.NullPointerException