You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "Johny Rufus (JIRA)" <ji...@apache.org> on 2015/08/27 21:43:46 UTC

[jira] [Updated] (FLUME-2773) TailDirSource throws FileNotFound Exception if ~/.flume directory is not created already

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

Johny Rufus updated FLUME-2773:
-------------------------------
    Attachment: FLUME-2773.patch

Attached patch, that makes sure to create any missing parent directories in the positionFile path (either default or user given input)
This ensures that position files are always created [Currently if default postionPath is assumed and .flume is not there, then the position checkpointing does not happen and user is not made aware of this fact, unless the user looks in the log file for the exception]

> TailDirSource throws FileNotFound Exception if ~/.flume directory is not created already
> ----------------------------------------------------------------------------------------
>
>                 Key: FLUME-2773
>                 URL: https://issues.apache.org/jira/browse/FLUME-2773
>             Project: Flume
>          Issue Type: Bug
>    Affects Versions: v1.7.0
>            Reporter: Johny Rufus
>            Assignee: Johny Rufus
>         Attachments: FLUME-2773.patch
>
>
> If we leave the positionFile parameter to default, 
> then the following exception is thrown when ~/.flume is not present
> [We should take care of creating the default directory if not present ]
> 2015-08-27 09:44:30,551 (positionWriter) [ERROR - org.apache.flume.source.taildir.TaildirSource.writePosition(TaildirSource.java:312)] Failed writing positionFile
> java.io.FileNotFoundException: /Users/jrufus/.flume/taildir_position.json (No such file or directory)
>         at java.io.FileOutputStream.open(Native Method)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:171)
>         at java.io.FileWriter.<init>(FileWriter.java:90)
>         at org.apache.flume.source.taildir.TaildirSource.writePosition(TaildirSource.java:306)
>         at org.apache.flume.source.taildir.TaildirSource.access$600(TaildirSource.java:56)
>         at org.apache.flume.source.taildir.TaildirSource$PositionWriterRunnable.run(TaildirSource.java:298)



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