我们能为hdfs接收器添加一个分隔符吗?当写入is文件时,如何添加记录分隔符?
配置如下:-
tier1.sinks.hdfssink.type = hdfs
tier1.sinks.hdfssink.channel = memory
tier1.sinks.hdfssink.hdfs.path=tmp/kafka/%{topic}/%y-%m-%d
tier1.sinks.hdfssink.hdfs.rollSize=268435456
tier1.sinks.hdfssink.hdfs.rollCount=0
tier1.sinks.hdfssink.hdfs.rollInterval = 0
tier1.sinks.hdfssink.hdfs.useLocalTimeStamp=true
tier1.sinks.hdfssink.hdfs.fileType=DataStream
tier1.sinks.hdfssink.hdfs.inUseSuffix=.tmp
tier1.sinks.hdfssink.hdfs.batchSize=10000
1条答案
按热度按时间2q5ifsrm1#
我倾向于使用flume eventserializer,其配置与此类似:
有关详细信息和代码段,您可以参考以下github站点。
https://github.com/relistan/flume-serializers
希望这对你有帮助!