You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "Jeff Lord (JIRA)" <ji...@apache.org> on 2013/11/28 03:12:35 UTC
[jira] [Updated] (FLUME-2056) Allow SpoolDir to pass just the
filename that is the source of an event
[ https://issues.apache.org/jira/browse/FLUME-2056?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jeff Lord updated FLUME-2056:
-----------------------------
Attachment: FLUME-2056.0.patch
Attached is a patch which adds this functionality to put the basename of a file in the event headers. Reviewboard link to follow shortly.
> Allow SpoolDir to pass just the filename that is the source of an event
> -----------------------------------------------------------------------
>
> Key: FLUME-2056
> URL: https://issues.apache.org/jira/browse/FLUME-2056
> Project: Flume
> Issue Type: New Feature
> Reporter: Jeff Lord
> Assignee: Jeff Lord
> Priority: Minor
> Attachments: FLUME-2056.0.patch
>
>
> Currently we allow for passing of the absolute path.
> It would be nice to just pass the filename in the event headers and allow for using that on the hdfs sink.
> if (annotateFileName) {
> String filename = currentFile.get().getFile().getAbsolutePath();
> for (Event event : events) {
> event.getHeaders().put(fileNameHeader, filename);
> }
> }
--
This message was sent by Atlassian JIRA
(v6.1#6144)