Flume collects data to hdfs, the file content appears garbled

Flume collects data to hdfs, the file content appears garbled

Original file content

12312321321321 3213123213kj1kj311 fdrefwrfrewf fdffswfwrefwrfrewfre
growerfwrwerffrerwwfrefewrf sdffwerffffrefreff saffwreewrewfrewfrrw
sdfewrrewffew sdfrfffwrfrwf fsrfwweferfr

File content on hdfs

SEQ!
or

Check flume official website
Insert picture description herehttp://flume.apache.org/releases/content/1.9.0/FlumeUserGuide.html#hdfs-sink

Insert picture description here
Add attributes and write in stream. The default is SequenceFile

a1.sinks.k1.hdfs.fileType=DataStream

View the content of the hdfs file:

12312321321321 3213123213kj1kj311 fdrefwrfrewf fdffswfwrefwrfrewfre
growerfwrwerffrerwwfrefewrf sdffwerffffrefreff saffwreewrewfrewfrrw
sdfewrrewffew sdfrfffwrfrwf fsrfwweferfr

Guess you like

Origin blog.csdn.net/weixin_43614067/article/details/108244630