In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to solve the problems when using flume". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to solve the problems when using flume.
Question: java.lang.NullPointerException: Expected timestamp
Sink is the hdfs, and then uses the automatic directory generation feature. If there is an error such as the title, the official website document says that you need to have a timestamp at the beginning of each file record line, but the format of the timestamp may be difficult to adjust, so you can also set the parameter hdfs.useLocalTimeStamp, such as every hour as a folder, then the configuration should be like this:
A1.sinks.k1.hdfs.path = hdfs://ubuntu:9000/flume/events/%y-%m-%d/%Ha1.sinks.k1.hdfs.filePrefix = events-a1.sinks.k1.hdfs.round = truea1.sinks.k1.hdfs.roundValue = 1a1.sinks.k1.hdfs.roundUnit = houra1.sinks.k1.hdfs.useLocalTimeStamp = true
Or modify the parameter hdfs.timeZone so that it can be the same as the date format of the log file we uploaded. It should be fine. It has not been tested.
Thank you for your reading, the above is the content of "how to solve the problems when using flume". After the study of this article, I believe you have a deeper understanding of how to solve this problem when using flume, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.