用于spooldir事件的flume uuid拦截器

ef1yzkbh  于 2021-06-03  发布在  Hadoop
关注(0)|答案(0)|浏览(210)

我正在尝试为文件中的每个事件添加一个uuid,当它使用flume推送到hdfs时。
我使用了以下uuid拦截器:

agentTest.sources.sampleDirSource.interceptors = uuidInterceptor
agentTest.sources.sampleDirSource.interceptors.uuidInterceptor.type = org.apache.flume.sink.solr.morphline.UUIDInterceptor$Builder
agentTest.sources.sampleDirSource.interceptors.uuidInterceptor.headerName = id
agentTest.sources.sampleDirSource.interceptors.uuidInterceptor.preserveExisting = true
agentTest.sources.sampleDirSource.interceptors.uuidInterceptor.prefix = "flume_"

但我的档案里没有任何结果。我知道我可以使用头中的{id}字段,但是从文档中我希望得到一个新字段添加到每个日志记录中。
这个拦截器为所有被截获的事件设置一个通用的唯一标识符
我错过什么了吗?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题