You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "Julien Sobczak (JIRA)" <ji...@apache.org> on 2016/02/18 17:42:18 UTC

[jira] [Updated] (FLUME-2884) Tag not allowed in ElasticSearch indexNameBuilder properties

     [ https://issues.apache.org/jira/browse/FLUME-2884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julien Sobczak updated FLUME-2884:
----------------------------------
    Attachment: FLUME-2884-0.patch

> Tag not allowed in ElasticSearch indexNameBuilder properties
> ------------------------------------------------------------
>
>                 Key: FLUME-2884
>                 URL: https://issues.apache.org/jira/browse/FLUME-2884
>             Project: Flume
>          Issue Type: Bug
>          Components: Sinks+Sources
>            Reporter: Julien Sobczak
>         Attachments: FLUME-2884-0.patch
>
>
> Note: *The patch FLUME - 2207 is required to reproduce the issue.*
> The following code causes the flume agent to crash a stack trace when starting (illegal pattern passed to {{FastDateFormat}}) : 
> {code}
> agent1.sinks.sinkEls.indexNameBuilder.dateFormat = %{format}
> {code}
> In practice, we need a variable to customize the index rotation (daily, weekly, monthly) from a header. (the header is defined in a morphline in our case, configured as an interceptor on the source)
> The problem happens because the {{FastDateFormat}} is instanciated in the method {{configure}}. We could delay its instanciation inside the method {{getIndexName}} without decrease the performance of the agent ({{FastDateFormat}} uses caching extensively). I added a patch to present this implementation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)