我正在尝试为文件中的每个事件添加一个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}字段,但是从文档中我希望得到一个新字段添加到每个日志记录中。
这个拦截器为所有被截获的事件设置一个通用的唯一标识符
我错过什么了吗?
暂无答案!
目前还没有任何答案,快来回答吧!